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 --&gt; Scriptblock binding (for readonly properties) or Name --&gt; Hashtable binding, with the inner hashtable containing two keys: get &amp; 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 =&gt; $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 --&gt; Scriptblock binding (for readonly properties) or Name --&gt; Hashtable binding, with the inner hashtable containing two keys: get &amp; 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 =&gt; $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 =&gt; $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 --&gt; Scriptblock binding (for readonly properties) or Name --&gt; Hashtable binding, with the inner hashtable containing two keys: get &amp; 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 &lt;dbatools&gt;.&lt;Name&gt;. 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 &lt;dbatools&gt;' 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 &lt;dbatools&gt;.&lt;Name&gt;. 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 &lt;dbatools&gt;' 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 &lt;dbatools&gt;' 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 &lt;dbatools&gt;.&lt;Name&gt;. 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 &lt;dbatools&gt;' 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&gt; 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 a database to an availability group on a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Adds a database to an availability group on a SQL Server instance.</maml:para><maml:para>Before joining the replica databases to the availablity group, the databases will be initialized with automatic seeding or full/log backup.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-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.

This should be the primary replica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="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>AvailabilityGroup</maml:name><maml:description><maml:para>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="3" 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="4" 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 if you'd like to be explicit about replicas, this will help.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.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>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="6" 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="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="7" 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.

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="8" 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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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 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 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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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 if you'd like to be explicit about replicas, this will help.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml: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.

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 target SQL Server instance or instances. Server version must be SQL Server version 2012 or higher.

This should be the primary replica.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml: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:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AvailabilityGroup, HA, AG
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: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: AvailabilityGroup, HA, AG
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:\&gt; </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:\&gt; </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:\&gt; </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 a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Adds 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>Add-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>Name</maml:name><maml:description><maml:para>The name of the replica. Defaults to the SQL Server instance 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>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="4" 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="5" 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="6" 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="7" 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. 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>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="9" 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>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="10" 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="11" 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="true" position="12" 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>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. 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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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>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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml: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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml: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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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: AvailabilityGroup, HA, AG
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:\&gt; </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:\&gt; </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: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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>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
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:\&gt; </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:\&gt; </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:examples></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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: 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:\&gt; </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, Database, Security, Login
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:\&gt; </maml:para></maml:introduction><dev:code> Add-DbaDbRoleMember -SqlInstance localhost -Database mydb -Role db_owner -DatabaseUser 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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = Get-Content C:\servers.txt </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </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:\&gt; </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:\&gt; $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-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:\&gt; </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:\&gt; </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 flexiblity, 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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 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-DbaServerRoleMember 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-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, Security, 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:\&gt; </maml:para></maml:introduction><dev:code> Add-DbaServerRoleMember -SqlInstance server1 -Role dbcreator -Login login1 </dev:code><dev:remarks><maml:para> Adds login1 to the server-level role dbcreator on the instance server1 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> Add-DbaServerRoleMember -SqlInstance server1, sql2016 -ServerRole customrole -Login login1 </dev:code><dev:remarks><maml:para> Adds login1 in custom, server-level role customrole 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:\&gt; </maml:para></maml:introduction><dev:code> Add-DbaServerRoleMember -SqlInstance server1 -ServerRole customrole -Role dbcreator </dev:code><dev:remarks><maml:para> Adds custom, server-level role customrole to dbcreator server-level fixed role. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> $servers = Get-Content C:\servers.txt </dev:code><dev:remarks><maml:para> PS C:\&gt; $servers | Add-DbaServerRoleMember -ServerRole sysadmin -Login login1

Adds login1 to the sysadmin 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:\&gt; </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 server-level roles bulkadmin and dbcreator </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> $roles = Get-DbaServerRole -SqlInstance localhost -ServerRole "bulkadmin","dbcreator" </dev:code><dev:remarks><maml:para> PS C:\&gt; $roles | Add-DbaServerRoleMember -Login login1

Adds login1 on the server localhost to the server-level roles bulkadmin and dbcreator </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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-DbaDatabase</command:name><command:noun>DbaDatabase</command:noun><command:verb>Backup</command:verb><maml:description><maml:para>Backup one or more SQL Sever 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>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 useing 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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="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>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 useing 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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="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>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 useing 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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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 useing 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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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>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:\&gt; </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:\&gt; </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:\&gt; </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 blog 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:\&gt; </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 blog 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:\&gt; </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 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> PS C:\ 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 striptest, 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:examples></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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 system path 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>A string value that specifies the system path 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 system path 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>A string value that specifies the system path 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 system path 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>A string value that specifies the system path 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>A string value that specifies the system path 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 system path 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: Migration, Certificate
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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Backup-DbaDbCertificate -SqlInstance Server1 -Path \\Server1\Certificates -EncryptionPassword (ConvertTo-SecureString -force -AsPlainText GoodPass1234!!) </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:\&gt; </maml:para></maml:introduction><dev:code> $EncryptionPassword = ConvertTo-SecureString -AsPlainText "GoodPass1234!!" -force </dev:code><dev:remarks><maml:para> PS C:\&gt; $DecryptionPassword = ConvertTo-SecureString -AsPlainText "Password4567!!" -force
PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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: Certificate, 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:\&gt; </maml:para></maml:introduction><dev:code> Backup-DbaDbMasterKey -SqlInstance server1\sql2016 </dev:code><dev:remarks><maml:para> ```
ComputerName : SERVER1
InstanceName : SQL2016
SqlInstance : SERVER1\SQL2016
Database : master
Filename : E:\MSSQL13.SQL2016\MSSQL\Backup\server1$sql2016-master-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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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: Certificate, 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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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: 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:\&gt; </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:\&gt; </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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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: 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:\&gt; </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:\&gt; </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:\&gt; </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: WaitStatistic, 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:\&gt; </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:\&gt; </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 robus, 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 - custom connection" 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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml: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="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>AuthenticationType</maml:name><maml:description><maml:para>Basically used to force AD Universal with MFA Support when other types have been detected</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</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>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="22" 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="23" 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>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>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>AuthenticationType</maml:name><maml:description><maml:para>Basically used to force AD Universal with MFA Support when other types have been detected</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml: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 - custom connection" 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>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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml: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>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>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>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: Connect, 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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $wincred = Get-Credential ad\sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> $sqlcred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance -SqlInstance myserver.database.windows.net -Database mydb -Credential me@mydomain.onmicrosoft.com -DisableException </dev:code><dev:remarks><maml:para> PS C:\&gt; Invoke-Query -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:\&gt; </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:\&gt; Invoke-Query -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:\&gt; </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance -SqlInstance "myserver.public.cust123.database.windows.net,3342" -Database mydb -Credential me@mydomain.onmicrosoft.com -DisableException </dev:code><dev:remarks><maml:para> PS C:\&gt; Invoke-Query -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:\&gt; </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:\&gt; Invoke-Query -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:\&gt; </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance -ConnectionString "Data Source=TCP:mydb.database.windows.net,1433;User ID=sqladmin;Password=adfasdf;MultipleActiveResultSets=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;" </dev:code><dev:remarks><maml:para> PS C:\&gt; Invoke-Query -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:\&gt; </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:\&gt; $server = Connect-DbaInstance -SqlInstance psdbatools.database.windows.net -Database abc -SqCredential $cred -Tenant guidheremaybename
PS C:\&gt; Invoke-Query -SqlInstance $server -Query "select 1 as test"

When connecting from a non-Azure worksatation, logs into Azure using Universal with MFA Support with a username and password, then performs a sample query. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 14 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance -SqlInstance psdbatools.database.windows.net -Database abc -AuthenticationType 'AD Universal with MFA Support' </dev:code><dev:remarks><maml:para> PS C:\&gt; Invoke-Query -SqlInstance $server -Query "select 1 as test"

When connecting from an Azure VM with .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:\&gt; </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:\&gt; Set-DbatoolsConfig -FullName azure.tenantid -Value 'guidheremaybename' -Passthru | Register-DbatoolsConfig
PS C:\&gt; Set-DbatoolsConfig -FullName azure.appid -Value $cred.Username -Passthru | Register-DbatoolsConfig
PS C:\&gt; Set-DbatoolsConfig -FullName azure.clientsecret -Value $cred.Password -Passthru | Register-DbatoolsConfig # requires securestring
PS C:\&gt; Set-DbatoolsConfig -FullName sql.connection.database -Value abc -Passthru | Register-DbatoolsConfig
PS C:\&gt; Connect-DbaInstance -SqlInstance psdbatools.database.windows.net

Permenently sets some app id config values. To set them temporarily (just for a session), remove -Passthru | Register-DbatoolsConfig
When connecting from a non-Azure worksatation 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 16 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> $server = Connect-DbaInstance -SqlInstance psdbatools.database.windows.net -Thumbprint FF6361E82F21664F64A2576BB49EAC429BD5ABB6 -Store CurrentUser -Tenant tenant-guid -SqlCredential app-id-guid-here -Database abc </dev:code><dev:remarks><maml:para> PS C:\&gt; Invoke-Query -SqlInstance $server -Query "select 1 as test"

Logs into Azure using Universal with MFA Support with a certificate, then performs a sample query. Note that you will be prompted for a password but the password can be left blank and the certifiate will be used instead. </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: DataTable, 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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 visualisation.
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 visualisation.
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: 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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $messageParameters = @{ </dev:code><dev:remarks><maml:para> &gt;&gt; Subject = "Backup history for sql2017 and sql2016"
&gt;&gt; Body = Get-DbaDbBackupHistory -SqlInstance sql2017, sql2016 -Since '2018-08-13 00:00' | ConvertTo-DbaTimeline | Out-String
&gt;&gt; From = "dba@ad.local"
&gt;&gt; To = "dba@ad.local"
&gt;&gt; SmtpServer = "smtp.ad.local"
&gt;&gt; }
&gt;&gt;
PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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.

https://msdn.microsoft.com/en-us/library/ms181597.aspx</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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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>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 &amp; 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>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 &amp; 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>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>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 &amp; 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:\&gt; </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:\&gt; </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:\&gt; </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 exists 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:\&gt; </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, distribution). </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> PS C:\ Copy-DbaDatabase -Source sql2014 -Destination managedinstance.cus19c972e4513d6.database.windows.net -DestinationCredential $cred -AllDatabases -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:\&gt; </maml:para></maml:introduction><dev:code> PS C:\ Copy-DbaDatabase -Source sql2014 -Destination managedinstance.cus19c972e4513d6.database.windows.net -DestinationCredential $cred -Database MyDb -NewName AzureDb -WithReplace -SharedPath https://someblob.blob.core.windows.net/sql -Azure Credential 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: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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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>http://dbatools.io/Get-SqlDatabaseAssembly</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-QueryStoreConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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 doing</maml:para><maml:para>$sourcetable = Invoke-DbaQuery -SqlInstance instance1 ... -As DataTable</maml:para><maml:para>Write-DbaDbTableData -SqlInstance ... -InputObject $sourcetable</maml:para><maml:para>but it will force buffering the contents on the table in memory (high RAM usage for large tables).</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-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 target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml: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 target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</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>Define a specific table you would like to use as source. You can specify a three-part name like db.sch.tbl.
If the object has special characters please wrap them in square brackets [ ].
This 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 passing dbo.[First.Table]</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command: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>If you want to copy only a portion of a table or selected tables, specify the query.
Ensure to select all required columns. Calculated Columns or columns with default values may be excluded.
The tablename should be a full three-part name in form [Database].[Schema].[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>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 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="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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</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 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="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 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="12" 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.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>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 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>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 target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml: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.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>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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml: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>If you want to copy only a portion of a table or selected tables, specify the query.
Ensure to select all required columns. Calculated Columns or columns with default values may be excluded.
The tablename should be a full three-part name in form [Database].[Schema].[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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></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>Define a specific table you would like to use as source. You can specify a three-part name like db.sch.tbl.
If the object has special characters please wrap them in square brackets [ ].
This 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 passing dbo.[First.Table]</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml: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:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Migration
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:\&gt; </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 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:\&gt; </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] 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:\&gt; </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:\&gt; </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 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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> &gt;&gt; SqlInstance = 'sql1'
&gt;&gt; Destination = 'sql2'
&gt;&gt; Database = 'dbatools_from'
&gt;&gt; DestinationDatabase = 'dbatools_dest'
&gt;&gt; Table = '[Schema].[Table]'
&gt;&gt; DestinationTable = '[dbo].[Table.Copy]'
&gt;&gt; KeepIdentity = $true
&gt;&gt; KeepNulls = $true
&gt;&gt; Truncate = $true
&gt;&gt; BatchSize = 10000
&gt;&gt; }
&gt;&gt;
PS C:\&gt; Copy-DbaDbTableData @params

Copies all the data from table [Schema].[Table] 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:\&gt; </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> &gt;&gt; SqlInstance = 'server1'
&gt;&gt; Destination = 'server1'
&gt;&gt; Database = 'AdventureWorks2017'
&gt;&gt; DestinationDatabase = 'AdventureWorks2017'
&gt;&gt; Table = '[Person].[EmailPromotion]'
&gt;&gt; BatchSize = 10000
&gt;&gt; Query = "SELECT * FROM [Person].[Person] where EmailPromotion = 1"
&gt;&gt; }
&gt;&gt;
PS C:\&gt; Copy-DbaDbTableData @params

Copies data returned from the query on server1 into the AdventureWorks2017 on server1.
Copy is processed in BatchSize of 10000 rows. Presuming the Person.EmailPromotion exists already. </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-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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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>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>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:\&gt; </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:\&gt; </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 &amp; newer: Migrates logins with SIDs, passwords, defaultdb, server roles &amp; securables, database permissions &amp; 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="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>LoginRenameHashtable</maml:name><maml:description><maml:para>Pass a hash table into this parameter to be passed into Rename-DbaLogin to update the Login and mappings after the Login is completed.</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>If this switch and -Force are enabled, all active connections and sessions on Destination will be killed.

A login cannot be dropped when it has active connections on the 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>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>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 be passed into Rename-DbaLogin to update the Login and mappings after the Login is completed.</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>If this switch and -Force are enabled, all active connections and sessions on Destination will be killed.

A login cannot be dropped when it has active connections on the 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>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>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="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 be passed into Rename-DbaLogin to update the Login and mappings after the Login is completed.</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>If this switch and -Force are enabled, all active connections and sessions on Destination will be killed.

A login cannot be dropped when it has active connections on the 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>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>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="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 be passed into Rename-DbaLogin to update the Login and mappings after the Login is completed.</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>If this switch and -Force are enabled, all active connections and sessions on Destination will be killed.

A login cannot be dropped when it has active connections on the 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>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>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 be passed into Rename-DbaLogin to update the Login and mappings after the Login is completed.</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>If this switch and -Force are enabled, all active connections and sessions on Destination will be killed.

A login cannot be dropped when it has active connections on the 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>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>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>If this switch and -Force are enabled, all active connections and sessions on Destination will be killed.

A login cannot be dropped when it has active connections on the 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>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 be passed into Rename-DbaLogin to update the Login and mappings after the Login is completed.</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>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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Copy-DbaLogin -LoginRenameHashtable @{ "PreviousUser" = "newlogin" } -Source $Sql01 -Destination Localhost -SourceSqlCredential $sqlcred </dev:code><dev:remarks><maml:para> Copies PreviousUser and then renames it to newlogin. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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: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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-DbaSsisCatalog</command:name><command:noun>DbaSsisCatalog</command:noun><command:verb>Copy</command:verb><maml:description><maml:para>Copy-DbaSsisCatalog migrates Folders, SSIS projects, and environments from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>By default, all folders, projects, and environments are copied. The -Project parameter can be specified to copy only one project, if desired.</maml:para><maml:para>The parameters get more granular from the Folder level. For example, specifying -Folder will only deploy projects/environments from within that folder.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Copy-DbaSsisCatalog</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 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="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 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="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>Project</maml:name><maml:description><maml:para>Specifies a source Project 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>Folder</maml:name><maml:description><maml:para>Specifies a source folder 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>Environment</maml:name><maml:description><maml:para>Specifies an environment to 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="7" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CreateCatalogPassword</maml:name><maml:description><maml:para>Specifies a secure string to use in creating an SSISDB catalog on Destination. If this is specified, prompts for the password will be skipped.</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>EnableSqlClr</maml:name><maml:description><maml:para>If this switch is enabled and Destination does not have the SQL CLR configuration option enabled, user prompts for enabling it on Destination will be skipped. SQL CLR is required for SSISDB.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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 SSIS Catalog will be dropped and recreated on Destination 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>CreateCatalogPassword</maml:name><maml:description><maml:para>Specifies a secure string to use in creating an SSISDB catalog on Destination. If this is specified, prompts for the password will be skipped.</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 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>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>EnableSqlClr</maml:name><maml:description><maml:para>If this switch is enabled and Destination does not have the SQL CLR configuration option enabled, user prompts for enabling it on Destination will be skipped. SQL CLR is required for SSISDB.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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 an environment to 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>Folder</maml:name><maml:description><maml:para>Specifies a source folder 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>If this switch is enabled, the SSIS Catalog will be dropped and recreated on Destination 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>Project</maml:name><maml:description><maml:para>Specifies a source Project 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>Source</maml:name><maml:description><maml:para>Source SQL Server. 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">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, SSIS
Author: Phil Schwartz (philschwartz.me, @pschwartzzz)

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:\&gt; </maml:para></maml:introduction><dev:code> Copy-DbaSsisCatalog -Source sqlserver2014a -Destination sqlcluster </dev:code><dev:remarks><maml:para> Copies all folders, environments and SSIS Projects from sqlserver2014a to sqlcluster, using Windows credentials to authenticate to both instances. If folders with the same name exist on the destination they will be skipped, but projects will be redeployed. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> Copy-DbaSsisCatalog -Source sqlserver2014a -Destination sqlcluster -Project Archive_Tables -SourceSqlCredential $cred -Force </dev:code><dev:remarks><maml:para> Copies a single Project, the Archive_Tables Project, from sqlserver2014a to sqlcluster using SQL credentials to authenticate to sqlserver2014a and Windows credentials to authenticate to sqlcluster. If a Project with the same name exists on sqlcluster, it will be deleted 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:\&gt; </maml:para></maml:introduction><dev:code> Copy-DbaSsisCatalog -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:\&gt; </maml:para></maml:introduction><dev:code> $SecurePW = Read-Host "Enter password" -AsSecureString </dev:code><dev:remarks><maml:para> PS C:\&gt; Copy-DbaSsisCatalog -Source sqlserver2014a -Destination sqlcluster -CreateCatalogPassword $SecurePW

Deploy entire SSIS catalog to an instance without a destination catalog. User prompts for creating the catalog on Destination will be bypassed. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Copy-DbaSsisCatalog</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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), http://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Copy-DbaSysDbUserObject -Source $sourceServer -Destination $destserver </dev:code><dev:remarks><maml:para> Copies user objects from source to destination </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: AvailabilityGroup, HA, AG,
Author: Shawn Melton (@wsmelton), http://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:\&gt; </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:\&gt; </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:\&gt; </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-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:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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
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:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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: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: TraceFlag, DBCC
Author: Garry Bargsley (@gbargsley), http://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:\&gt; </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>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: 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:\&gt; </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:\&gt; </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:\&gt; </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: AvailabilityGroup, HA, AG,
Author: Shawn Melton (@wsmelton), http://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:\&gt; </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:\&gt; </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:\&gt; </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-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:\&gt; </maml:para></maml:introduction><dev:code> Enable-DbaFilestream -SqlInstance server1\instance2 -FileStreamLevel TSql </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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
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:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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: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: TraceFlag, DBCC
Author: Garry Bargsley (@gbargsley), http://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:\&gt; </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:\&gt; </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 -&gt; 16384 -&gt; 24576 ... 73728 -&gt; 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, Backup
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml: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).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml: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).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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: Migration, Database, 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:\&gt; </maml:para></maml:introduction><dev:code> Export-DbaDacPackage -SqlInstance sql2016 -Database SharePoint_Config </dev:code><dev:remarks><maml:para> Exports the dacpac for SharePoint_Config on sql2016 to $home\Documents\SharePoint_Config.dacpac </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> $options = New-DbaDacOption -Type Dacpac -Action Export </dev:code><dev:remarks><maml:para> PS C:\&gt; $options.ExtractAllTableData = $true
PS C:\&gt; $options.CommandTimeout = 0
PS C:\&gt; Export-DbaDacPackage -SqlInstance sql2016 -Database DB1 -Options $options

Uses DacOption object to set the CommandTimeout to 0 then extracts the dacpac for DB1 on sql2016 to $home\Documents\DB1.dacpac including all table data. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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" &amp; "DBMonitoring", on sql2016 and saves them to C:\temp </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> $moreparams = "/OverwriteFiles:$true /Quiet:$true" </dev:code><dev:remarks><maml:para> PS C:\&gt; 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. Uses command line instead of SMO behind the scenes. </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 databsase 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:\&gt; </maml:para></maml:introduction><dev:code> Export-DbaDbRole -SqlInstance sql2005 -Path C:\temp </dev:code><dev:remarks><maml:para> Exports the Database Roles for all 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:\&gt; </maml:para></maml:introduction><dev:code> Export-DbaDbRole -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:\&gt; </maml:para></maml:introduction><dev:code> Export-DbaDbRole -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:\&gt; </maml:para></maml:introduction><dev:code> Export-DbaDbRole -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:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqlserver2014a -Database HR, Accounting | Export-DbaDbRole </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:\&gt; </maml:para></maml:introduction><dev:code> Export-DbaDbRole -SqlInstance sqlserver2008 -Login realcajun, netnerds -Path C:\temp\login.sql -ExcludeGoBatchSeparator </dev:code><dev:remarks><maml:para> 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:\&gt; </maml:para></maml:introduction><dev:code> Export-DbaDbRole -SqlInstance sqlserver2008 -Login realcajun -Path C:\temp\users.sql </dev:code><dev:remarks><maml:para> Exports login realcajun from sqlserver2008 to the file C:\temp\users.sql </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sqlserver2008 -Login realcajun | Export-DbaDbRole </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:\&gt; </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, exludes 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:\&gt; </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:\&gt; </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:\&gt; </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: Query
Author: Andre Kamman (@AndreKamman), http://clouddba.io

Website: https://dbatools.io
Copyright: (c) 2018 by dbatools, licensed under MIT
License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $output = Invoke-DbaDiagnosticQuery -SqlInstance sql2016 </dev:code><dev:remarks><maml:para> PS C:\&gt; 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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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.

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: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 scripts.</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: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="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>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>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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command: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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml: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 the target file instead of overwriting.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</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>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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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 the target file instead of overwriting.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml: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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml: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>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>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:\&gt; </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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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 C:\dr\sqlcluster </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> Export-DbaInstance -SqlInstance sqlcluster -Path C:\servers\ -NoPrefix </dev:code><dev:remarks><maml:para> Exports everything to C:\servers but scripts do not include prefix information. </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Export-DbaLogin -SqlInstance sqlserver2008 -Login realcajun, netnerds -Path C:\temp\login.sql -ExcludeGoBatchSeparator </dev:code><dev:remarks><maml:para> 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</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>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: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>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>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>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:\&gt; </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:\&gt; </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:\&gt; </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: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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $options = New-DbaScriptingOption </dev:code><dev:remarks><maml:para> PS C:\&gt; $options.ScriptSchema = $true
PS C:\&gt; $options.IncludeDatabaseContext = $true
PS C:\&gt; $options.IncludeHeaders = $false
PS C:\&gt; $Options.NoCommandTerminator = $false
PS C:\&gt; $Options.ScriptBatchTerminator = $true
PS C:\&gt; $Options.AnsiFile = $true
PS C:\&gt; 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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $options = New-DbaScriptingOption </dev:code><dev:remarks><maml:para> PS C:\&gt; $options.ScriptSchema = $true
PS C:\&gt; $options.IncludeDatabaseContext = $true
PS C:\&gt; $options.IncludeHeaders = $false
PS C:\&gt; $Options.NoCommandTerminator = $false
PS C:\&gt; $Options.ScriptBatchTerminator = $true
PS C:\&gt; $Options.AnsiFile = $true
PS C:\&gt; $Databases = Get-DbaDatabase -SqlInstance sql2016 -ExcludeDatabase master, model, msdb, tempdb
PS C:\&gt; foreach ($db in $Databases) {
&gt;&gt; Export-DbaScript -InputObject $db -FilePath C:\temp\export.sql -Append -Encoding UTF8 -ScriptingOptionsObject $options -NoPrefix
&gt;&gt; }

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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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, exludes 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:\&gt; </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:\&gt; </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, exludes 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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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-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><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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="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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</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>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>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>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:\&gt; </maml:para></maml:introduction><dev:code> Export-DbaUser -SqlInstance sql2005 -Path 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:\&gt; </maml:para></maml:introduction><dev:code> Export-DbaUser -SqlInstance sqlserver2014a $scred -Path 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:\&gt; </maml:para></maml:introduction><dev:code> Export-DbaUser -SqlInstance sqlserver2014a -User User1, User2 -Path 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:\&gt; </maml:para></maml:introduction><dev:code> Export-DbaUser -SqlInstance sqlserver2008 -User User1 -Path 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 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> Export-DbaUser -SqlInstance sqlserver2008 -Database db1,db2 -Path 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 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> $options = New-DbaScriptingOption </dev:code><dev:remarks><maml:para> PS C:\&gt; $options.ScriptDrops = $false
PS C:\&gt; $options.WithDependencies = $true
PS C:\&gt; Export-DbaUser -SqlInstance sqlserver2008 -Database db1,db2 -Path 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 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> Export-DbaUser -SqlInstance sqlserver2008 -Database db1,db2 -Path 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: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:\&gt; </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:\&gt; </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 Extened 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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 havent 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 havent 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
Author: Stephen Bennett (https://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: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
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:\&gt; </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:\&gt; </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:\&gt; </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: Find, Help, Command
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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
Author: Stephen Bennett, https://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:\&gt; </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:\&gt; </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:\&gt; </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
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:\&gt; </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:\&gt; </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:\&gt; </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 &amp; db2 on server "sqlserver2016". </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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,Growth,Database
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:\&gt; </maml:para></maml:introduction><dev:code> Find-DbaDatabaseGrowthEvent -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:\&gt; </maml:para></maml:introduction><dev:code> Find-DbaDatabaseGrowthEvent -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:\&gt; </maml:para></maml:introduction><dev:code> Find-DbaDatabaseGrowthEvent -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 &amp; ServerA\SQL2014. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> Find-DbaDatabaseGrowthEvent -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:\&gt; </maml:para></maml:introduction><dev:code> Find-DbaDatabaseGrowthEvent -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:\&gt; </maml:para></maml:introduction><dev:code> Find-DbaDatabaseGrowthEvent -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-DbaDatabaseGrowthEvent</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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 that 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="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 that 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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command: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
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:\&gt; </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:\&gt; </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:\&gt; </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: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 &amp; Subnet Mask (e.g.: "10.1.1.1/255.255.255.0")
- IP Address &amp; 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 &amp; Subnet Mask (e.g.: "10.1.1.1/255.255.255.0")
- IP Address &amp; 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
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Find-DbaInstance -ComputerName localhost | Get-DbaDatabase | Select-Object SqlInstance, Name, Status, RecoveryModel, SizeMB, Compatibility, Owner, LastFullBackup, LastDiffBackup, LastLogBackup | 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 a subset of the important information in a formatted table.

Using this method reguarly 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, Security
Author: Stephen Bennett, https://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:\&gt; </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:\&gt; </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:\&gt; </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="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>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="3" 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>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: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>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
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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
Author: Jana Sattainathan (@SQLJana), http://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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
Author: Stephen Bennett, https://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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
Author: Stephen Bennett, https://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:\&gt; </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:\&gt; </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
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-DbaAgDatabase</command:name><command:noun>DbaAgDatabase</command:noun><command:verb>Get</command:verb><maml:description><maml:para>Gets availability group databases from a SQL Server instance.</maml:para></maml:description></command:details><maml:description><maml:para>Gets availability group databases from a SQL Server instance.</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: AvailabilityGroup, HA, AG, Database
Author: Shawn Melton (@wsmelton), https://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:\&gt; </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:\&gt; </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:\&gt; </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 all 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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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: Agent, SMO
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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="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>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>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>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:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Job, Agent
Author: Garry Bargsley (@gbargsley), http://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: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>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 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>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. 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, 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:\&gt; </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:\&gt; </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:\&gt; </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>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>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>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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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: Job, Agent
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: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 (https://sqldbawithabeard.com) | 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $Servers = 'SERVER','SERVER\INSTANCE1' </dev:code><dev:remarks><maml:para> Get-DbaAgentJobOutputFile -SqlInstance $Servers -Job 'The Agent Job' -OpenFile

This will return the configured paths to the output files for each of the job step of the The Agent Job Job
on the SERVER instance and the SERVER\INSTANCE1 and open the files if they are available </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> (Get-DbaAgentJobOutputFile -SqlInstance SERVERNAME | Out-GridView -PassThru).FileName | Invoke-Item </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 and enable you to choose the output
file and open it </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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: Job, Agent
Author: Klaas Vandenberghe (@PowerDbaKlaas), http://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: Logging
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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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 proxy to process - this list is auto-populated from the server. If unspecified, all proxies 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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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 proxy to process - this list is auto-populated from the server. If unspecified, all proxies 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: Agent, SMO
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:\&gt; </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:\&gt; </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>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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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), http://www.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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaAgentSchedule -SqlInstance sql2016 -Schedule "Maintenance10min","Maintenance60min" </dev:code><dev:remarks><maml:para> Returns the "Maintenance10min" &amp; "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: Cláudio Silva (@claudioessilva), https://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:\&gt; </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:\&gt; </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: AvailabilityGroup, HA, AG, Service
Author: Shawn Melton (@wsmelton), http://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:\&gt; </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: AvailabilityGroup, HA, AG, Listener
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:\&gt; </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:\&gt; </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:\&gt; </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: AvailabilityGroup, AG, HA, Replica
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:\&gt; </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:\&gt; </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:\&gt; </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: Hadr, HA, AG, AvailabilityGroup
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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>Function to get available collations for a given SQL Server</maml:para></maml:description></command:details><maml:description><maml:para>The Get-DbaAvailableCollation function 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
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:\&gt; </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
Author: Garry Bargsley (@gbargsley), http://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:\&gt; </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:\&gt; </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 this switch is set, then Files will be parsed as locally files. This can cause failures if the running user can see files that the parsing SQL Instance cannot</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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>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>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>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>NoXpDirTree</maml:name><maml:description><maml:para>If this switch is set, then Files will be parsed as locally files. This can cause failures if the running user can see files that the parsing SQL Instance cannot</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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:\&gt; </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:\&gt; </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:\&gt; robocopy c:\store\ \\remoteMachine\C$\store\ BackupHistory.xml
PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\network\backups </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </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:\&gt; </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-DbaBuildReference</command:name><command:noun>DbaBuildReference</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-DbaBuildReference</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>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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>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
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:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaBuildReference -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:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaBuildReference -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:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaBuildReference -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:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaRegServer -SqlInstance sqlserver2014a | Get-DbaBuildReference </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-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>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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: Protocol
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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="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="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 tu 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 tu 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:\&gt; </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:\&gt; </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
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:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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: ServerInfo
Author: Shawn Melton (@wsmelton), https://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:\&gt; </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:\&gt; </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:\&gt; </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-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:\&gt; </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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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: 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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $usage = Get-DbaCpuUsage -SqlInstance sql2017 </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </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>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="3" 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="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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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>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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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: Credential
Author: Garry Bargsley (@gbargsley), http://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:\&gt; </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:\&gt; </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:\&gt; </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: Error, CustomError
Author: Garry Bargsley (@gbargsley), http://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:\&gt; </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:\&gt; </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. This will also indicate which of these databases only have CopyOnly 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="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 &amp; 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 &amp; 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. This will also indicate which of these databases only have CopyOnly 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>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), http://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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: Assembly, Database
Author: Garry Bargsley (@gbargsley), http://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:\&gt; </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:\&gt; </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: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-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>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>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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="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>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>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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="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>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 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>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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>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>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>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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-DbaDbccUserOptions</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </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-DbaMemoryStatus</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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>sometimes it's text, other times cert</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command: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>sometimes it's text, other times cert</maml:para></maml:description><command:parameterValue required="false" variableLength="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
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaDbCertificate -SqlInstance Server1 -Database db1 -Subject 'Availability Group Cert' </dev:code><dev:remarks><maml:para> Gets the cert1 certificate within the db1 database </maml:para></dev:remarks></command:example></command:examples></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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), https://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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, http://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:\&gt; </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:\&gt; </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.Object[]</command: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. 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: 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:\&gt; </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:\&gt; </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:\&gt; </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:examples></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; '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:\&gt; </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, Database
Author: Stephen Bennett, https://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-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
License: GNU GPL v3 https://opensource.org/licenses/GPL-3.0 </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $Cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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>http://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:\&gt; </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="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>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: Database
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:examples></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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: Database, FileGroup
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-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), https://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; '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:\&gt; </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:\&gt; $IdentityTables = Invoke-DbaQuery -SqlInstance SQLServer2017 -Database AdventureWorks2014 -Query $query -As SingleValue
PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: Database, LogFile
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: 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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\&gt; $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 accounts from SQL Server</maml:para></maml:description></command:details><maml:description><maml:para>Gets database mail accounts 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: 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/MITIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\&gt; $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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\&gt; $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: 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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\&gt; $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: 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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\&gt; $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 profiles from SQL Server</maml:para></maml:description></command:details><maml:description><maml:para>Gets database mail profiles 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>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>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>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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\&gt; $servers | Get-DbaDbMail | Get-DbaDbMailProfile

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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\&gt; $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, 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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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), https://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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: 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:\&gt; </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:\&gt; </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: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: 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:\&gt; </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:\&gt; </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: Cláudio Silva (@claudioessilva), https://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:\&gt; </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:\&gt; </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:\&gt; </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, Security, 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> et-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:\&gt; </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:\&gt; </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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:examples></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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 Schemes</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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:examples></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </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:\&gt; </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-DbaQueryStoreOptions</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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>Get-DbaDbRecoveryModel displays the Recovery Model.</maml:para></maml:description></command:details><maml:description><maml:para>Get-DbaDbRecoveryModel 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, Simple, Full, Bulk, BulkLogged
Author: Viorel Ciucu (@viorelciucu), https://www.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:\&gt; </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:\&gt; </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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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: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, Database, Security, Login
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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = Get-Content C:\servers.txt </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </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:\&gt; </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:\&gt; </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, Database, Security, 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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = Get-Content C:\servers.txt </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $roles = Get-DbaDbRole -SqlInstance localhost -Database msdb -Role 'db_owner' </dev:code><dev:remarks><maml:para> PS C:\&gt; $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-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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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, Storage
Author: Michael Fal (@Mike_Fal), http://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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="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 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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:examples></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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="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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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, https://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:\&gt; </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:\&gt; </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:\&gt; </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 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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, 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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, 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:examples></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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="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>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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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, 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:examples></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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-SqlTLogResponsibly 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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: Config
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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\&gt; $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: Database, Dependent, Dependency, 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:\&gt; </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:\&gt; $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
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:\&gt; </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:\&gt; </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 filesystems 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 filesystems 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
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: Engine, Corruption
Author: Garry Bargsley (@gbargsley), http://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:\&gt; </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:\&gt; </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), http://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:\&gt; </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:\&gt; </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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = "sql2014","sql2016", "sqlcluster\sharepoint" </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </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:\&gt; </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
Author: Shawn Melton (@wsmelton), https://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:\&gt; </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: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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = "sqlserver2014a","sql2016t" </dev:code><dev:remarks><maml:para> PS C:\&gt; $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-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 $env: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
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:\&gt; </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:\&gt; </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:\&gt; </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: Discovery
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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $all = Get-DbaDefaultPath -SqlInstance sql2014 </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-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
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:\&gt; </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:\&gt; </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: Index
Author: Nic Cain, https://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:\&gt; </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:\&gt; </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 &amp; MyDB2 databases. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-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), http://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:\&gt; </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:\&gt; </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), http://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:\&gt; </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:\&gt; </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
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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: Protocol
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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaInstanceProtocol -ComputerName sql1,sql2 | Out-GridView </dev:code><dev:remarks><maml:para> Gets the SQL Server related server 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:\&gt; </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
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:\&gt; </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
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:\&gt; </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:\&gt; </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:\&gt; </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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.

This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.

Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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 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: 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:\&gt; </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:\&gt; </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:\&gt; </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: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, RecoveryModel, LastFullBackup, LastDiffBackup, LastLogBackup, SinceFull, SinceDiff, SinceLog, Status, DatabaseCreated, DaysSinceDbCreated.</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:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaLastBackup -SqlInstance ServerA\sql987 </dev:code><dev:remarks><maml:para> Returns a custom object displaying Server, Database, RecoveryModel, LastFullBackup, LastDiffBackup, LastLogBackup, SinceFull, SinceDiff, SinceLog, Status, DatabaseCreated, DaysSinceDbCreated </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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 Server, Database, RecoveryModel, LastFullBackup, LastDiffBackup, LastLogBackup, SinceFull, SinceDiff, SinceLog, Status, DatabaseCreated, DaysSinceDbCreated. </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
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> $output = Get-DbaLatchStatistic -SqlInstance sql2008 </dev:code><dev:remarks><maml:para> PS C:\&gt; $output
PS C:\&gt; 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, https://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:\&gt; </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:\&gt; </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-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: 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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaLocaleSetting -ComputerName sql1,sql2 -SqlCredential $credential | Out-Gridview </dev:code><dev:remarks><maml:para> Gets the Locale settings on computers sql1 and sql2 using SQL Authentication to authenticate to the servers, 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-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.</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.Object[]</command: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>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.Object[]</command: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 - 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="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.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml: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>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.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml: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 - 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>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.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml: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.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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, Security
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: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'. ATM only IndexOptimize parsing is available</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command: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 errorlogpath 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'. ATM only IndexOptimize parsing is available</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml: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 errorlogpath 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: Ola, Maintenance
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 </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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 Mangaement 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), http://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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
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:\&gt; </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:\&gt; </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: 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:\&gt; </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:\&gt; </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:\&gt; </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: StoredProcedure, 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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
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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $Computers = (Get-Content D:\configfiles\SQL\MySQLInstances.txt | % {$_.split('\')[0]}) </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </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:\&gt; </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: 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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaNetworkActivity -ComputerName sql1,sql2 | Out-Gridview </dev:code><dev:remarks><maml:para> Gets the Current traffic on every Network Interface 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-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>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-DbaNetworkCertificate</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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate
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:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaNetworkCertificate </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:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaNetworkCertificate -ComputerName sql2016 </dev:code><dev:remarks><maml:para> Gets computer certificates on sql2016 that are being used for SQL Server network encryption </maml:para></dev:remarks></command:example></command:examples></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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: Database, 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:\&gt; </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:\&gt; </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: ServerInfo, OperatingSystem
Author: Shawn Melton (@wsmelton), https://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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $wincred = Get-Credential ad\sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; '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:\&gt; </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: CIM
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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, https://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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>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, Databases
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: 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:\&gt; </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:\&gt; </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: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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: PowerPlan
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:\&gt; </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:\&gt; </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: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' 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
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:\&gt; </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:\&gt; </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:\&gt; </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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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. Works with SQL Server 2005-2017</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:para>Uses key decoder by Jakob Bindslet (http://goo.gl/1jiwcB)</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
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:\&gt; </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: Query, Performance
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-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-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 0</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command: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>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="10" 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 0</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml: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>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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: Configuration, 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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: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:\&gt; </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: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:\&gt; </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:\&gt; </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:\&gt; </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: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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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 Pool objects, including both internal and external</maml:para></maml:description></command:details><maml:description><maml:para>Gets all Resource Governor Pool objects, including both internal and external</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:\&gt; </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:\&gt; </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, https://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:\&gt; </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:\&gt; </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:\&gt; </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: Migration, Backup, Database
Author: Stuart Moore (@napalmgram - http://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: ServerRole, Security
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:\&gt; </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:\&gt; </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: ServerRole, Security, 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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = Get-Content C:\servers.txt </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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 SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml: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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml: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"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml: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 SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml: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 SQL Server instance or instances.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml: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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml: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>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"</maml:para></maml:description><command:parameterValue required="false" variableLength="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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential WindowsUser </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; </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 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> $MyServers = Get-Content .\servers.txt </dev:code><dev:remarks><maml:para> PS C:\&gt; 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 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> $services = Get-DbaService -ComputerName sql1 -Type Agent,Engine </dev:code><dev:remarks><maml:para> PS C:\&gt; $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 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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, https://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential SqlCredential </dev:code><dev:remarks><maml:para> PS C:\&gt; '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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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), http://www.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:\&gt; </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:\&gt; </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:\&gt; </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-DbaSsisEnvironmentVariable</command:name><command:noun>DbaSsisEnvironmentVariable</command:noun><command:verb>Get</command:verb><maml:description><maml:para>This command gets specified SSIS Environment and all its variables</maml:para></maml:description></command:details><maml:description><maml:para>This command gets all variables from specified environment from SSIS Catalog. All sensitive values are decrypted.</maml:para><maml:para>The function communicates directly with SSISDB database, "SQL Server Integration Services" service isn't queried there.</maml:para><maml:para>Each parameter (besides SqlInstance and SqlCredential) acts as the filter to only include or exclude particular element</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-DbaSsisEnvironmentVariable</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>Environment</maml:name><maml:description><maml:para>The SSIS Environments names that we want to get variables 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="3" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnvironmentExclude</maml:name><maml:description><maml:para>The SSIS Environments to exclude. Acts as a filter for environments, best used without 'Environment' parameter
to get variables for all environments but excluded ones</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command: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>Folder</maml:name><maml:description><maml:para>The Folders names that contain the environments</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command: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>FolderExclude</maml:name><maml:description><maml:para>The Folders names to exclude. Acts as a filter for folders containing environments, best user without 'Folder' parameter
to get variables for all folders but excluded ones</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>The SSIS Environments names that we want to get variables 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>EnvironmentExclude</maml:name><maml:description><maml:para>The SSIS Environments to exclude. Acts as a filter for environments, best used without 'Environment' parameter
to get variables for all environments but excluded ones</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml: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>The Folders names that contain the environments</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>FolderExclude</maml:name><maml:description><maml:para>The Folders names to exclude. Acts as a filter for folders containing environments, best user without 'Folder' parameter
to get variables for all folders but excluded ones</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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: SSIS, SSISDB, Variable
Author: Bartosz Ratajczyk (@b_ratajczyk)

Website: https://dbatools.io
Copyright: (c) 2018 by dbatools, licensed under MIT
License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaSsisEnvironmentVariable -SqlInstance localhost -Environment DEV -Folder DWH_ETL </dev:code><dev:remarks><maml:para> Gets variables of 'DEV' environment located in 'DWH_ETL' folder on 'localhost' Server </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaSsisEnvironmentVariable -SqlInstance localhost -Environment DEV -Folder DWH_ETL, DEV2, QA </dev:code><dev:remarks><maml:para> Gets variables of 'DEV' environment(s) located in folders 'DWH_ETL', 'DEV2' and 'QA' on 'localhost' server </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaSsisEnvironmentVariable -SqlInstance localhost -Environment DEV -FolderExclude DWH_ETL, DEV2, QA </dev:code><dev:remarks><maml:para> Gets variables of 'DEV' environments located in folders other than 'DWH_ETL', 'DEV2' and 'QA' on 'localhost' server </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaSsisEnvironmentVariable -SqlInstance localhost -Environment DEV, PROD -Folder DWH_ETL, DEV2, QA </dev:code><dev:remarks><maml:para> Gets variables of 'DEV' and 'PROD' environment(s) located in folders 'DWH_ETL', 'DEV2' and 'QA' on 'localhost' server </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaSsisEnvironmentVariable -SqlInstance localhost -EnvironmentExclude DEV, PROD -Folder DWH_ETL, DEV2, QA </dev:code><dev:remarks><maml:para> Gets variables of environments other than 'DEV' and 'PROD' located in folders 'DWH_ETL', 'DEV2' and 'QA' on 'localhost' server </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaSsisEnvironmentVariable -SqlInstance localhost -EnvironmentExclude DEV, PROD -FolderExclude DWH_ETL, DEV2, QA </dev:code><dev:remarks><maml:para> Gets variables of environments other than 'DEV' and 'PROD' located in folders other than 'DWH_ETL', 'DEV2' and 'QA' on 'localhost' server </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 7 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> 'localhost' | Get-DbaSsisEnvironmentVariable -EnvironmentExclude DEV, PROD </dev:code><dev:remarks><maml:para> Gets all SSIS environments except 'DEV' and 'PROD' from 'localhost' server. The server name comes from pipeline </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 8 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> 'SRV1', 'SRV3' | Get-DbaSsisEnvironmentVariable </dev:code><dev:remarks><maml:para> Gets all SSIS environments from 'SRV1' and 'SRV3' servers. The server's names come from pipeline </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 9 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> 'SRV1', 'SRV2' | Get-DbaSsisEnvironmentVariable DEV | Out-GridView </dev:code><dev:remarks><maml:para> Gets all variables from 'DEV' Environment(s) on servers 'SRV1' and 'SRV2' and outputs it as the GridView.
The server names come from the pipeline. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 10 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> 'localhost' | Get-DbaSsisEnvironmentVariable -EnvironmentExclude DEV, PROD | Select-Object -Property Name, Value | Where-Object {$_.Name -match '^a'} | Out-GridView </dev:code><dev:remarks><maml:para> Gets all variables from Environments other than 'DEV' and 'PROD' on 'localhost' server,
selects Name and Value properties for variables that names start with letter 'a' and outputs it as the GridView </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-DbaSsisEnvironmentVariable</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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>Get-DbaSsisHistory Retreives SSIS project and package execution History, and environments from one SQL Server to another.</maml:para></maml:description></command:details><maml:description><maml:para>This command gets execution history for SSIS executison 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: Migration, 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:\&gt; </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:\&gt; </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:\&gt; </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
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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $wincred = Get-Credential ad\sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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), http://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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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="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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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: SQLWMI, tcp
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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, Space
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:\&gt; </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: 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:\&gt; </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:\&gt; </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: Config, 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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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 (&lt;Module&gt;.&lt;Name&gt;) 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 (&lt;Module&gt;.&lt;Name&gt;) 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 (&lt;Module&gt;.&lt;Name&gt;) 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: Config, 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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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: Debug
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-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: Query, 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: Security, Trace
Author: Garry Bargsley (@gbargsley), http://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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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: 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:\&gt; </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:\&gt; </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:\&gt; </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
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:\&gt; </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:\&gt; </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:\&gt; </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 implementators 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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>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: Discovery, Permissions, Security
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:\&gt; </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:\&gt; </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:\&gt; </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: Waits,Task,WaitTask
Author: Shawn Melton (@wsmelton), https://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:\&gt; </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:\&gt; </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: 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:\&gt; </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:\&gt; </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:\&gt; </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: WaitStatistic
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $output = Get-DbaWaitStatistic -SqlInstance sql2008 </dev:code><dev:remarks><maml:para> PS C:\&gt; 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
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:\&gt; </maml:para></maml:introduction><dev:code> $ErrorLogs = Get-DbaWindowsLog -SqlInstance sql01\sharepoint </dev:code><dev:remarks><maml:para> PS C:\&gt; $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: Cluster, WSFC, FCI, 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:\&gt; </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: Cluster, WSFC, FCI, 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:\&gt; </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:\&gt; </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: Cluster, WSFC, FCI, 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:\&gt; </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: Cluster, WSFC, FCI, 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:\&gt; </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: Cluster, WSFC, FCI, 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:\&gt; </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:\&gt; </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: Cluster, WSFC, FCI, 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:\&gt; </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:\&gt; </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: Cluster, WSFC, FCI, 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:\&gt; </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:\&gt; </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-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: Cluster, WSFC, FCI, 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:\&gt; </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: Cluster, WSFC, FCI, 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:\&gt; </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:\&gt; </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: Cluster, WSFC, FCI, 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:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: AvailabilityGroup, HA, AG, Replica
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:\&gt; </maml:para></maml:introduction><dev:code> Grant-DbaAgPermission -SqlInstance sql2017a -Type AvailabilityGroup -AvailabilityGroup SharePoint -Login ad\spservice -Permission CreateAnyDatabase </dev:code><dev:remarks><maml:para> Adds CreateAnyDatabase permissions to 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:\&gt; </maml:para></maml:introduction><dev:code> Grant-DbaAgPermission -SqlInstance sql2017a -Type AvailabilityGroup -AvailabilityGroup ag1, ag2 -Login ad\spservice -Permission CreateAnyDatabase -Confirm </dev:code><dev:remarks><maml:para> Adds CreateAnyDatabase permissions to 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:\&gt; </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-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. This is automatically used if -Turbo is enabled.

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">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>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.</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.</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 is #.</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 maxmimum 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">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>Comment</maml:name><maml:description><maml:para>Defines the default comment character indicating that a line is commented out. Default is #.</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.</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 maxmimum 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.</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. This is automatically used if -Turbo is enabled.

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: Migration, Import
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $columns = @{ </dev:code><dev:remarks><maml:para> &gt;&gt; Text = 'FirstName'
&gt;&gt; Number = 'PhoneNumber'
&gt;&gt; }
PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>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:\&gt; </maml:para></maml:introduction><dev:code> Import-DbaXESessionTemplate -SqlInstance sql2017 -Template db_query_wait_stats </dev:code><dev:remarks><maml:para> Creates a new XESession named db_query_wait_stats 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:\&gt; </maml:para></maml:introduction><dev:code> Import-DbaXESessionTemplate -SqlInstance sql2017 -Template db_query_wait_stats -Name "Query Wait Stats" </dev:code><dev:remarks><maml:para> Creates a new XESession named "Query Wait Stats" using the db_query_wait_stats template. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaXESession -SqlInstance sql2017 -Session 'Database Health 2014' | Remove-DbaXESession </dev:code><dev:remarks><maml:para> PS C:\&gt; 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 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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-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>sp_Blitz, sp_BlitzWho, sp_BlitzFirst, sp_BlitzIndex, sp_BlitzCache and sp_BlitzTrace, etc.</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. (master or 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 instal 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 zipfile 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>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. (master or 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 instal 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 zipfile 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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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: BrentOzar, FRK, FirstResponderKit
Author: Tara Kizer, Brent Ozar Unlimited (https://www.brentozar.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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = "sql2016\standardrtm", "sql2016\sqlexpress", "sql2014" </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </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: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 dowloaded 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: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.</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>Used when executing installs against remote servers</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</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.
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="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&gt; 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>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 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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command: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 between Mixed and Windows 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="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>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="17" 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="18" 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="19" 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="20" 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="21" 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="22" 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="23" 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="24" 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="25" 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="26" 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="27" 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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>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.
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>AuthenticationMode</maml:name><maml:description><maml:para>Chooses between Mixed and Windows 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>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&gt; 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>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>Used when executing installs against remote servers</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml: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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml: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>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 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>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>Version</maml:name><maml:description><maml:para>SQL Server version you wish to install.</maml:para></maml:description><command:parameterValue required="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: 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> C:\PS&gt; </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> C:\PS&gt; </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> C:\PS&gt; </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> C:\PS&gt; </maml:para></maml:introduction><dev:code> Install-DbaInstance -Version 2017 -InstancePath G:\SQLServer </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. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 5 -------------------------- </maml:title><maml:introduction><maml:para> C:\PS&gt; </maml:para></maml:introduction><dev:code> $svcAcc = Get-Credential MyDomain\SvcSqlServer </dev:code><dev:remarks><maml:para> C:\PS&gt; 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> C:\PS&gt; </maml:para></maml:introduction><dev:code> $config = @{ </dev:code><dev:remarks><maml:para> AGTSVCSTARTUPTYPE = "Manual"
    SQLCOLLATION = "Latin1_General_CI_AS"
    BROWSERSVCSTARTUPTYPE = "Manual"
    FILESTREAMLEVEL = 1
}
C:\PS&gt; Install-DbaInstance -SqlInstance localhost\v2017:1337 -Version 2017 -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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml: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 zipfile 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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>LocalFile</maml:name><maml:description><maml:para>Specifies the path to a local file to install Ola's solution 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/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">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="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: Ola, Maintenance
Author: Viorel Ciucu, 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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> &gt;&gt; SqlInstance = 'MyServer'
        &gt;&gt; Database = 'maintenance'
        &gt;&gt; ReplaceExisting = $true
        &gt;&gt; InstallJobs = $true
        &gt;&gt; LogToTable = $true
        &gt;&gt; BackupLocation = 'C:\Data\Backup'
        &gt;&gt; CleanupTime = 65
        &gt;&gt; Verbose = $true
        &gt;&gt; }
        &gt;&gt; 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:\&gt; </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:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>http://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-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: 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 </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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
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:\&gt; </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:\&gt; </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 zipfile 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://whoisactive.com/</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml: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, the 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, the 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 zipfile 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://whoisactive.com/</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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: AdamMechanic, WhoIsActive, SpWhoIsActive
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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Install-DbaWhoIsActive -SqlInstance sqlserver2014a -Database master -LocalFile c:\SQLAdmin\whoisactive_install.sql </dev:code><dev:remarks><maml:para> Installs sp_WhoisActive to sqlserver2014a's master database from the local file whoisactive_install.sql </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> $instances = Get-DbaRegServer sqlserver </dev:code><dev:remarks><maml:para> PS C:\&gt; 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&gt; 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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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&gt; 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>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><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</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>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="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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></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>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>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>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 - http://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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $BackupHistory | Invoke-DbaAdvancedRestore -SqlInstance MyInstance -OutputScriptOnly </dev:code><dev:remarks><maml:para> PS C:\&gt; $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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>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>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><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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="true" 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="true" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance..</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml: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: AvailabilityGroup, HA, AG, Failover
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:\&gt; </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:\&gt; </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:\&gt; </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 whould 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, Space
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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: Log, Cycle
Author: Shawn Melton (@wsmelton), https://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:\&gt; </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:\&gt; </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:\&gt; </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-DbaCycleLog</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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, 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:\&gt; </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>Query</maml:name><maml:description><maml:para>If you would like to mask only a subset of a table, use the Query parameter, otherwise all data will be masked.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</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>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="12" 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="13" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>Timeout for the database connection in seconds. 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="14" 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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>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>ConnectionTimeout</maml:name><maml:description><maml:para>Timeout for the database connection in seconds. 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>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>Query</maml:name><maml:description><maml:para>If you would like to mask only a subset of a table, use the Query parameter, otherwise all data will be masked.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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: DataMasking, Database
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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>Invoke-DbaDbDecryptObject returns the decrypted version of an object</maml:para></maml:description></command:details><maml:description><maml:para>When a procedure or a function is created with encryption and you lost the code you're in trouble.</maml:para><maml:para>You cannot alter the object or view the definition.</maml:para><maml:para>With this command you can search for the object and decrypt the it.</maml:para><maml:para>The command will output the results to the console.</maml:para><maml:para>There is an option to export all the results to a folder creating .sql files.</maml:para><maml:para>Make sure the instance allowed dedicated administrator connections (DAC).</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 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>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 look through 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 that's 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>Used for exporting the results to.
The destiation 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 look through 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 that's 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>Used for exporting the results to.
The destiation 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, 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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 acount.</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 including the name of the database.
If the folder is set but doesn't exist the default data folder of the secondary instance will be used including the name 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="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 the default transaction log folder of the secondary 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="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 = 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="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 including the name of the database.
If the folder is set but doesn't exist the default data folder of the secondary instance will be used including the name 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>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 the default transaction log folder of the secondary 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>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 = 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>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:\&gt; </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> &gt;&gt; SourceSqlInstance = 'sql1'
&gt;&gt; DestinationSqlInstance = 'sql2'
&gt;&gt; Database = 'db1'
&gt;&gt; SharedPath= '\\sql1\logshipping'
&gt;&gt; LocalPath= 'D:\Data\logshipping'
&gt;&gt; BackupScheduleFrequencyType = 'daily'
&gt;&gt; BackupScheduleFrequencyInterval = 1
&gt;&gt; CompressBackup = $true
&gt;&gt; CopyScheduleFrequencyType = 'daily'
&gt;&gt; CopyScheduleFrequencyInterval = 1
&gt;&gt; GenerateFullBackup = $true
&gt;&gt; RestoreScheduleFrequencyType = 'daily'
&gt;&gt; RestoreScheduleFrequencyInterval = 1
&gt;&gt; SecondaryDatabaseSuffix = 'DR'
&gt;&gt; CopyDestinationFolder = '\\sql2\logshippingdest'
&gt;&gt; Force = $true
&gt;&gt; }
&gt;&gt;
PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> &gt;&gt; SourceSqlInstance = 'sql1'
&gt;&gt; DestinationSqlInstance = 'sql2'
&gt;&gt; Database = 'db1'
&gt;&gt; SharedPath= '\\sql1\logshipping'
&gt;&gt; GenerateFullBackup = $true
&gt;&gt; Force = $true
&gt;&gt; }
&gt;&gt;
PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> Invoke-DbaDbLogShipRecovery -SqlInstance server1 </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:\&gt; </maml:para></maml:introduction><dev:code> Invoke-DbaDbLogShipRecovery -SqlInstance server1 -SqlCredential $cred -Verbose </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Invoke-DbaDbLogShipRecovery -SqlInstance server1 -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: 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:\&gt; </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:\&gt; </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 or witness, 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: 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:\&gt; </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> &gt;&gt; Primary = 'sql2017a'
&gt;&gt; Mirror = 'sql2017b'
&gt;&gt; MirrorSqlCredential = 'sqladmin'
&gt;&gt; Witness = 'sql2019'
&gt;&gt; Database = 'pubs'
&gt;&gt; SharedPath = '\\nas\sql\share'
&gt;&gt; }
&gt;&gt;
PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> &gt;&gt; Primary = 'sql2017a'
&gt;&gt; Mirror = 'sql2017b'
&gt;&gt; MirrorSqlCredential = 'sqladmin'
&gt;&gt; Witness = 'sql2019'
&gt;&gt; Database = 'pubs'
&gt;&gt; SharedPath = '\\nas\sql\share'
&gt;&gt; Force = $true
&gt;&gt; Confirm = $false
&gt;&gt; }
&gt;&gt;
PS C:\&gt; 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 Witness and restores them with
a fresh backup.

Does all the things in the decription, 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:\&gt; </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:\&gt; Get-ChildItem \\nas\seed | Restore-DbaDatabase -SqlInstance sql2017b -FileMapping $map -NoRecovery
PS C:\&gt; Get-DbaDatabase -SqlInstance sql2017a -Database pubs | Invoke-DbaDbMirroring -Mirror sql2017b -Confirm:$false

Restores backups from sql2017a to a specific file struture 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:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaDatabase -SqlInstance sql2017a -Database pubs | </dev:code><dev:remarks><maml:para> &gt;&gt; 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 asses 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: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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml: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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml: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>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: Data Masking, Database, Personal Information, GDPR
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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>http://sqlmag.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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-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. Based on https://thomaslarock.com/2014/06/upgrading-to-sql-server-2014-a-dozen-things-to-check/</maml:para></maml:description></command:details><maml:description><maml:para>Updates compatibility level, then runs CHECKDB with data_purity, DBCC updateusage, sp_updatestats and finally sp_refreshview against all user views.</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, 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 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, 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 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, https://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:\&gt; </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
-- 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:\&gt; </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:\&gt; </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:\&gt; </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>http://www.sqlskills.com/blogs/glenn/category/dmv-queries/</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 gridview 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 diagnostict queries to. This will split them based on server, databasename, 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. I
nstead 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. I
nstead 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 diagnostict queries to. This will split them based on server, databasename, 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 gridview 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: Database, DMV
Author: Andre Kamman (@AndreKamman), http://clouddba.io

Website: https://dbatools.io
Copyright: (c) 2018 by dbatools, licensed under MIT
License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </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 gridview 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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="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="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></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', and 'SingleValue'

PSObject output introduces overhead but adds flexibility for working with results: http://powershell.org/wp/forums/topic/dealing-with-dbnull/</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlParameters</maml:name><maml:description><maml:para>Specifies a hashtable of parameters 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.Collections.IDictionary</command:parameterValue><dev:type><maml:name>System.Collections.IDictionary</maml:name><maml: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. See examples for detail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="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="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="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></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', and 'SingleValue'

PSObject output introduces overhead but adds flexibility for working with results: http://powershell.org/wp/forums/topic/dealing-with-dbnull/</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlParameters</maml:name><maml:description><maml:para>Specifies a hashtable of parameters 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.Collections.IDictionary</command:parameterValue><dev:type><maml:name>System.Collections.IDictionary</maml:name><maml: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. See examples for detail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="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="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="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></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', and 'SingleValue'

PSObject output introduces overhead but adds flexibility for working with results: http://powershell.org/wp/forums/topic/dealing-with-dbnull/</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlParameters</maml:name><maml:description><maml:para>Specifies a hashtable of parameters 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.Collections.IDictionary</command:parameterValue><dev:type><maml:name>System.Collections.IDictionary</maml:name><maml: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. See examples for detail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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', and 'SingleValue'

PSObject output introduces overhead but adds flexibility for working with results: http://powershell.org/wp/forums/topic/dealing-with-dbnull/</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml: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. See examples for detail</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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>SqlParameters</maml:name><maml:description><maml:para>Specifies a hashtable of parameters 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.Collections.IDictionary</command:parameterValue><dev:type><maml:name>System.Collections.IDictionary</maml: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
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Invoke-DbaQuery -SqlInstance . -Query 'SELECT * FROM users WHERE Givenname = @name' -SqlParameters @{ 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:\&gt; </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: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: Formatting
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:\&gt; </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:\&gt; </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:\&gt; </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">System.Object</command: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>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
&lt;table_name&gt; 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
&lt;table_name&gt; 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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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 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">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml: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
&lt;table_name&gt; 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
&lt;table_name&gt; 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: AdamMechanic, WhoIsActive, SpWhoIsActive
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: AvailabilityGroup, HA, AG, Replica
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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $ag = Get-DbaAvailabilityGroup -SqlInstance sql01 -AvailabilityGroup SharePoint </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; </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>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:parameters><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: VLF, 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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Measure-DbaDbVirtualLogFile -SqlInstance sqlserver | Where-Object {$_.Count -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:\&gt; </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:\&gt; </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: Database, DiskSpace, Migration
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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> @( </dev:code><dev:remarks><maml:para> &gt;&gt; [PSCustomObject]@{Source='SQL1';Destination='SQL2';Database='DB1'},
&gt;&gt; [PSCustomObject]@{Source='SQL1';Destination='SQL2';Database='DB2'}
&gt;&gt; ) | 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:\&gt; </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&lt;tab&gt;Destination&lt;tab&gt;Database&lt;tab&gt;DestinationDatabase". </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> $qry = "SELECT Source, Destination, Database FROM dbo.Migrations" </dev:code><dev:remarks><maml:para> PS C:\&gt; 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: Debug
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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Import-Module dbatools </dev:code><dev:remarks><maml:para> PS C:\&gt; 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: 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:\&gt; </maml:para></maml:introduction><dev:code> $fileStructure = New-Object System.Collections.Specialized.StringCollection </dev:code><dev:remarks><maml:para> PS C:\&gt; $fileStructure.Add("E:\archive\example.mdf")
PS C:\&gt; $filestructure.Add("E:\archive\example.ldf")
PS C:\&gt; $filestructure.Add("E:\archive\example.ndf")
PS C:\&gt; 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:\&gt; </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:\&gt; </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-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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaRegServerGroup -SqlInstance sql2017 -Group HR\Development| Move-DbaRegServer -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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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="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>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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: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-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: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
TransactSql</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command: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
TransactSql</maml:para></maml:description><command:parameterValue required="false" variableLength="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:\&gt; </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:\&gt; </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 securtyadmin -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: securtyadmin
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, Daily, Weekly, Monthly, MonthlyRelative, AgentStart or IdleComputer

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: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Weekdays, Weekend or EveryDay.
The other allowed values are the 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: Time, Seconds, Minutes, or 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="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: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Weekdays, Weekend or EveryDay.
The other allowed values are the 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: Time, Seconds, Minutes, or 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>FrequencyType</maml:name><maml:description><maml:para>A value indicating when a job is to be executed.

Allowed values: Once, Daily, Weekly, Monthly, MonthlyRelative, AgentStart or IdleComputer

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:\&gt; </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 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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>* Performs backup to NUL 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>NOTE: If a backup / restore is performed, the backups will be left intact on the network share.</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: External, Wsfc or None. None 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>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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</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. Basic availability groups like pumpkin spice and uggs.

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 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="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. 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="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>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="19" 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="20" 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="21" 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="22" 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. Basic availability groups like pumpkin spice and uggs.

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: External, Wsfc or None. None 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>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. 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>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>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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml: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 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:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: AvailabilityGroup, HA, AG
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> New-DbaAvailabilityGroup -Primary sql2016b -Name AG1 -ClusterType Wsfc -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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; $params = @{
&gt;&gt; Primary = "sql1"
&gt;&gt; PrimarySqlCredential = $cred
&gt;&gt; Secondary = "sql2"
&gt;&gt; SecondarySqlCredential = $cred
&gt;&gt; Name = "test-ag"
&gt;&gt; Database = "pubs"
&gt;&gt; ClusterType = "None"
&gt;&gt; SeedingMode = "Automatic"
&gt;&gt; FailoverMode = "Manual"
&gt;&gt; Confirm = $false
&gt;&gt; }
PS C:\&gt; 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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $token = New-DbaAzAccessToken -Type ManagedIdentity -Subtype AzureSqlDb </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </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:\&gt; $server = Connect-DbaInstance -SqlInstance myserver.database.windows.net -Database mydb -AccessToken $token -DisableException
PS C:\&gt; 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">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command: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="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">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: 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:\&gt; </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:\&gt; </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:\&gt; </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>Exlicitly 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>Exlicitly 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>Exlicitly 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:\&gt; </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:\&gt; </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>http://sqlmag.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>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>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
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:examples></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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 to "dbatools PowerShell module - dbatools.io - custom connection" 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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</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="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 to "dbatools PowerShell module - dbatools.io - custom connection" 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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml: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>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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $wincred = Get-Credential ad\sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> $sqlcred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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 System.Data.SqlClient.SqlConnectionStringBuilder with the string specified</maml:para></maml:description></command:details><maml:description><maml:para>Creates a System.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 Sql 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="3" 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="4" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>IntegratedSecurity</maml:name><maml:description><maml:para>Set to true to use windows authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Nullable`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]</command:parameterValue><dev:type><maml:name>System.Nullable`1[[System.Boolean, 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="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>UserName</maml:name><maml:description><maml:para>Sql User Name to connect 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="6" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Password</maml:name><maml:description><maml:para>Password to use to connect 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>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">System.Data.SqlClient.SqlConnectionColumnEncryptionSetting</command:parameterValue><dev:type><maml:name>System.Data.SqlClient.SqlConnectionColumnEncryptionSetting</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">System.Data.SqlClient.SqlConnectionColumnEncryptionSetting</command:parameterValue><dev:type><maml:name>System.Data.SqlClient.SqlConnectionColumnEncryptionSetting</maml:name><maml: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 Sql 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>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>Set to true to use windows authentication.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Nullable`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]</command:parameterValue><dev:type><maml:name>System.Nullable`1[[System.Boolean, 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>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>Password</maml:name><maml:description><maml:para>Password to use to connect 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>UserName</maml:name><maml:description><maml:para>Sql User Name to connect 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>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:\&gt; </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:\&gt; </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">System.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>Identity</maml:name><maml:description><maml:para>The Credential Identity</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>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">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml: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">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml: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
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:\&gt; </maml:para></maml:introduction><dev:code> New-DbaCredential -SqlInstance Server1 </dev:code><dev:remarks><maml:para> You will be prompted to securely enter your password, then a credential will be created in the master database on server1 if it does not exist. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> New-DbaCredential -SqlInstance Server1 -Confirm:$false </dev:code><dev:remarks><maml:para> Suppresses all prompts to install but prompts to securely enter your password and creates a credential on Server1. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> &gt;&gt;SqlInstance = "Server1"
&gt;&gt;Name = "AzureBackupBlobStore"
&gt;&gt;Identity = "https://&lt;Azure Storage Account Name&gt;.blob.core.windows.net/&lt;Blob Container Name&gt;"
&gt;&gt;SecurePassword = (ConvertTo-SecureString '&lt;Azure Storage Account Access Key&gt;' -AsPlainText -Force)
&gt;&gt;}
PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> New-DbaCredential -SqlInstance Server1 -Name 'https://&lt;Azure Storage Account Name&gt;.blob.core.windows.net/&lt;Blob Store Container Name&gt;' -Identity 'SHARED ACCESS SIGNATURE' -SecurePassword (ConvertTo-SecureString '&lt;Shared Access Token&gt;' -AsPlainText -Force) </dev:code><dev:remarks><maml:para> Create a credential on Server1 using a SAS token for Backup To URL. Name has to be the full URI for the blob store container that will be the backup target. The SecurePassword will be the Share Access Token (SAS) and passed in as a SecureString. </maml:para></dev:remarks></command:example></command:examples></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>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: Migration, Database, 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:\&gt; </maml:para></maml:introduction><dev:code> $options = New-DbaDacOption -Type Dacpac -Action Export </dev:code><dev:remarks><maml:para> PS C:\&gt; $options.ExtractAllTableData = $true
PS C:\&gt; $options.CommandTimeout = 0
PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> $options = New-DbaDacOption -Type Dacpac -Action Publish </dev:code><dev:remarks><maml:para> PS C:\&gt; $options.DeployOptions.DropObjectsNotInSource = $true
PS C:\&gt; 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 "&lt;key&gt;value&lt;/key&gt;".</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 "&lt;key&gt;value&lt;/key&gt;".</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: 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:\&gt; </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:\&gt; </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.</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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</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 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>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="14" 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="15" 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="16" 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="17" 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: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>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>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>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 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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml: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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: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-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 to create the 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="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>StartDate</maml:name><maml:description><maml:para>Optional secure string used to create the certificate.</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 secure string used to create the certificate.</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>Optional secure string used to create the certificate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</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>Optional secure string used to create the certificate.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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 secure string used to create the certificate.</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 secure string used to create the certificate.</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 to create the 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:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: Certificate
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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </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-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>Name</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>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>Name</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>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: DbMail
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:\&gt; </maml:para></maml:introduction><dev:code> $account = New-DbaDbMailAccount -SqlInstance sql2017 -Name 'The DBA Team' -EmailAddress admin@ad.local -MailServer smtp.ad.local </dev:code><dev:remarks><maml:para> Creates a new db 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>Name</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>Name</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: DbMail
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:\&gt; </maml:para></maml:introduction><dev:code> $profile = New-DbaDbMailProfile -SqlInstance sql2017 -Name 'The DBA Team' </dev:code><dev:remarks><maml:para> Creates a new db 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: DataMasking, Database
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:\&gt; </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:\&gt; </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:\&gt; </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
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:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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, Database, Security
Author: Cláudio Silva (@ClaudioESSilva), https://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:\&gt; </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-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 filestructure 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 explicitely

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 explicitely

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 filestructure 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-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. Looks like this:

# Create collection
$cols = @()

# Add columns to collection
$cols += @{
    Name = 'test'
    Type = 'varchar'
    MaxLength = 20
    Nullable = $true
}
$cols += @{
    Name = 'test2'
    Type = 'int'
    Nullable = $false
}</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="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. Looks like this:

# Create collection
$cols = @()

# Add columns to collection
$cols += @{
    Name = 'test'
    Type = 'varchar'
    MaxLength = 20
    Nullable = $true
}
$cols += @{
    Name = 'test2'
    Type = 'int'
    Nullable = $false
}</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>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:\&gt; </maml:para></maml:introduction><dev:code> $col = @{ </dev:code><dev:remarks><maml:para> &gt;&gt; Name = 'test'
 &gt;&gt; Type = 'varchar'
 &gt;&gt; MaxLength = 20
 &gt;&gt; Nullable = $true
 &gt;&gt; }
PS C:\&gt; New-DbaDbTable -SqlInstance sql2017 -Database tempdb -Name testtable -ColumnMap $col

Creates a new table on sql2017 in tempdb witht he name testtable and one column </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Get-Table</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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 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. By default, system databases are excluded.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml: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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml: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: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 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. By default, system databases are excluded.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml: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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml: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">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml: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 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. By default, system databases are excluded.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml: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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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">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, User
Author: Frank Henninger (@osiris687)

Website: https://dbatools.io
Copyright: (c) 2018 by dbatools, licensed under MIT
License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaDbUser -SqlInstance sqlserver1 -Database DB1 | New-DbaDbUser -SqlInstance sqlserver2 -Database DB1 </dev:code><dev:remarks><maml:para> Copies users from sqlserver1.DB1 to sqlserver2.DB1. Does not copy permissions! </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", "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", "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: 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:\&gt; </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:\&gt; </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:\&gt; </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: 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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $credential = Get-Credential </dev:code><dev:remarks><maml:para> PS C:\&gt; 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. If a name is not specified, one will be auto-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="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>Port</maml:name><maml:description><maml:para>Port for TCP. If one is not provided, it will be autogenerated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</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>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="11" 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>Name</maml:name><maml:description><maml:para>The name of the endpoint. If a name is not specified, one will be auto-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>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 autogenerated.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml: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:\&gt; </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:\&gt; </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: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-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>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>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>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>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>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>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>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>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>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>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>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>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, Security
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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $securePassword = Read-Host "Input password" -AsSecureString </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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: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-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: Migration, Backup, DR
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:\&gt; </maml:para></maml:introduction><dev:code> $options = New-DbaScriptingOption </dev:code><dev:remarks><maml:para> PS C:\&gt; $options.ScriptDrops = $false
PS C:\&gt; $options.WithDependencies = $true
PS C:\&gt; Get-DbaAgentJob -SqlInstance sql2016 | Export-DbaScript -ScriptingOptionObject $options

Exports Agent Jobs with the Scripting Options ScriptDrops set to $false and WithDependencies 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, Database, Security
Author: Cláudio Silva (@ClaudioESSilva), https://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:\&gt; </maml:para></maml:introduction><dev:code> New-DbaServerRole -SqlInstance sql2017a -Role 'dbExecuter' -Owner sa </dev:code><dev:remarks><maml:para> Will create a new 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
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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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-DbaSsisCatalog</command:name><command:noun>DbaSsisCatalog</command:noun><command:verb>New</command:verb><maml:description><maml:para>Enables the SSIS Catalog on a SQL Server 2012+</maml:para></maml:description></command:details><maml:description><maml:para>After installing the SQL Server Engine and SSIS you still have to enable the SSIS Catalog. This function will enable the catalog and gives the option of supplying the password.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-DbaSsisCatalog</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 you wish to run the function 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>Credential</maml:name><maml:description><maml:para>Use a credential object instead of a securepassword</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</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>Required password that will be used for the security key in SSISDB.</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>SsisCatalog</maml:name><maml:description><maml:para>SSIS catalog name. By default, this is SSISDB.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>Use a credential object instead of a securepassword</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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>Required password that will be used for the security key in SSISDB.</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>SQL Server you wish to run the function 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>SsisCatalog</maml:name><maml:description><maml:para>SSIS catalog name. By default, this is SSISDB.</maml:para></maml:description><command:parameterValue required="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: SSIS, SSISDB, Catalog
Author: Stephen Bennett, https://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:\&gt; </maml:para></maml:introduction><dev:code> $SecurePassword = Read-Host -AsSecureString -Prompt "Enter password" </dev:code><dev:remarks><maml:para> PS C:\&gt; New-DbaSsisCatalog -SqlInstance DEV01 -SecurePassword $SecurePassword

Creates the SSIS Catalog on server DEV01 with the specified password. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> New-DbaSsisCatalog -SqlInstance sql2016 -Credential usernamedoesntmatter </dev:code><dev:remarks><maml:para> Creates the SSIS Catalog on server DEV01 with the specified password in the credential prompt. As the example username suggets the username does not matter.
This is simply an easier way to get a secure password. </maml:para></dev:remarks></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/New-DbaSsisCatalog</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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 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: Debug
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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $session = New-DbaXESession -SqlInstance sql2017 -Name XeSession_Test </dev:code><dev:remarks><maml:para> PS C:\&gt; $event = $session.AddEvent("sqlserver.file_written")
PS C:\&gt; $event.AddAction("package0.callstack")
PS C:\&gt; $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 &gt; 10000 AND cpu_time &gt; 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 &gt; 10000 AND cpu_time &gt; 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:\&gt; </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:\&gt; $response = New-DbaXESmartCsvWriter -OutputFile c:\temp\workload.csv -OutputColumn $columns -OverWrite -Event "sql_batch_completed"
PS C:\&gt; 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 &gt; 10000 AND cpu_time &gt; 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 &gt; 10000 AND cpu_time &gt; 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:\&gt; </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> &gt;&gt; SmtpServer = "smtp.ad.local"
&gt;&gt; To = "admin@ad.local"
&gt;&gt; Sender = "reports@ad.local"
&gt;&gt; Subject = "Query executed"
&gt;&gt; Body = "Query executed at {collection_time}"
&gt;&gt; Attachment = "batch_text"
&gt;&gt; AttachmentFileName = "query.sql"
&gt;&gt; }
&gt;&gt;
PS C:\&gt; $emailresponse = New-DbaXESmartEmail @params
PS C:\&gt; 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 &gt; 10000 AND cpu_time &gt; 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 &gt; 10000 AND cpu_time &gt; 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:\&gt; </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:\&gt; 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 &gt; 10000 AND cpu_time &gt; 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 &gt; 10000 AND cpu_time &gt; 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:\&gt; </maml:para></maml:introduction><dev:code> $response = New-DbaXESmartReplay -SqlInstance sql2017 -Database planning </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> $response = New-DbaXESmartReplay -SqlInstance sql2017 -Database planning </dev:code><dev:remarks><maml:para> PS C:\&gt; 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 &gt; 10000 AND cpu_time &gt; 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 &gt; 10000 AND cpu_time &gt; 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:\&gt; </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:\&gt; $response = New-DbaXESmartTableWriter -SqlInstance sql2017 -Database dbadb -Table deadlocktracker -OutputColumn $columns -Filter "duration &gt; 10000"
PS C:\&gt; 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 which is the output from an SSDT project and publishes it to a database. Changing the schema to match the dacpac and also to run any scripts in the dacpac (pre/post deploy scripts).</maml:para></maml:description></command:details><maml:description><maml:para>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: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).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="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>ScriptOnly</maml:name><maml:description><maml:para>If this switch is enabled, only the change scripts 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 ommited, 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).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="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="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="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>GenerateDeploymentScript</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>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, only the change scripts 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 ommited, 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 ommited, 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>GenerateDeploymentScript</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>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, only the change scripts 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).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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: Migration, Database, 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:\&gt; </maml:para></maml:introduction><dev:code> $options = New-DbaDacOption -Type Dacpac -Action Publish </dev:code><dev:remarks><maml:para> PS C:\&gt; $options.DeployOptions.DropObjectsNotInSource = $true
PS C:\&gt; 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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> New-DbaDacProfile -SqlInstance sql2016 -Database db2 -Path C:\temp </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; 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:\&gt; </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 -GenerateDeploymentScript -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:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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 -GenerateDeploymentReport -ScriptOnly </dev:code><dev:remarks><maml:para> Does not deploy the changes, but will generate the deployment report 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>Exact</maml:name><maml:description><maml:para>If this switch is enabled, only an exact search will be used for the Path. By default, this command will add a wildcard to the Path because Eventing uses the file name as a template and adds 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>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>Exact</maml:name><maml:description><maml:para>If this switch is enabled, only an exact search will be used for the Path. By default, this command will add a wildcard to the Path because Eventing uses the file name as a template and adds 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>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 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, Audit
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $backupinfo = Read-DbaBackupHeader -SqlInstance . -Path C:\temp\myfile.bak </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: Security, 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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Read-DbaTraceFile -SqlInstance sql2016 -Path C:\traces\big.trc -Where "LinkedServerName = 'myls' and StartTime &gt; '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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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: Database, Log, LogFile
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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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>Exact</maml:name><maml:description><maml:para>If this switch is enabled, only an exact search will be used for the Path. By default, this command will add a wildcard to the Path because Eventing uses the file name as a template and adds 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>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>Exact</maml:name><maml:description><maml:para>If this switch is enabled, only an exact search will be used for the Path. By default, this command will add a wildcard to the Path because Eventing uses the file name as a template and adds 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>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:\&gt; </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:\&gt; </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:\&gt; </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><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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: AvailabilityGroup, HA, AG, 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:\&gt; </maml:para></maml:introduction><dev:code> Remove-DbaAgDatabase -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:\&gt; </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-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="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="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:\&gt; </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:\&gt; </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:\&gt; </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: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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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="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="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, 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:\&gt; </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:\&gt; </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:\&gt; </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: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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-DbaAgentSchedule</command:name><command:noun>DbaAgentSchedule</command:noun><command:verb>Remove</command:verb><maml:description><maml:para>Remove-DbaAgentJobSchedule removes a job schedule.</maml:para></maml:description></command:details><maml:description><maml:para>Remove-DbaAgentJobSchedule removes a job in the SQL Server Agent.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-DbaAgentSchedule</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 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="true" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>Schedule</maml:name><maml:description><maml:para>The name of the job 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="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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:syntaxItem><maml:name>Remove-DbaAgentSchedule</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 schedule (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>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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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>InputObject</maml:name><maml:description><maml:para>A collection of schedule (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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Remove-DbaAgentSchedule -SqlInstance sql1 -Schedule weekly -Force </dev:code><dev:remarks><maml:para> Remove the schedule weekly from the job even if the schedule is being used by another job. </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> Remove-DbaAgentSchedule -SqlInstance sql1 -Schedule daily, weekly </dev:code><dev:remarks><maml:para> Remove multiple schedule </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> sql1, sql2, sql3 | Remove-DbaAgentSchedule -Schedule daily, weekly </dev:code><dev:remarks><maml:para> Remove the schedule on multiple servers using pipe line </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 6 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri>https://dbatools.io/Remove-DbaAgentJobSchedule</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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: AvailabilityGroup, HA, AG, Listener
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:\&gt; </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:\&gt; </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: AvailabilityGroup, HA, AG, Replica
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:\&gt; </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:\&gt; </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: AvailabilityGroup, HA, AG
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:\&gt; </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:\&gt; </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:\&gt; </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: Storage, DisasterRecovery, Backup
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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 compuer</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
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:\&gt; </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:\&gt; </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:\&gt; </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-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, Databases
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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>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>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>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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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, Remove
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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $Database = 'DemoNCIndex','RemoveTestDatabase' </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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-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
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:\&gt; </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)

PS C:\&gt; Remove-DbaDbBackupRestoreHistory -SqlInstance sql2016 -KeepDays 100 -Confirm:$false

Remove backup and restore history on SQL Server sql2016 older than 100 days. Does not prompt for confirmation.

PS C:\&gt; Remove-DbaDbBackupRestoreHistory -SqlInstance sql2016 -Database db1

Prompts for confirmation then deletes all backup and restore history for database db1 on SQL Server sql2016

PS C:\&gt; Get-DbaDatabase -SqlInstance sql2016 | Remove-DbaDbBackupRestoreHistory -WhatIf

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
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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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, Masterkey
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:\&gt; </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:\&gt; </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:\&gt; </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-DbaMasterKey</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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: 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:\&gt; </maml:para></maml:introduction><dev:code> Set-DbaDbMirror -SqlInstance localhost </dev:code><dev:remarks><maml:para> Returns all Endpoint(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:\&gt; </maml:para></maml:introduction><dev:code> Set-DbaDbMirror -SqlInstance localhost, sql2016 </dev:code><dev:remarks><maml:para> Returns all Endpoint(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/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>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: Mirror, HA, Monitor
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:\&gt; </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: Orphan, Database, Security, 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-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, Database, Security, Login
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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = Get-Content C:\servers.txt </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </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:\&gt; $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, Database, Security, Login
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:\&gt; </maml:para></maml:introduction><dev:code> Remove-DbaDbRoleMember -SqlInstance localhost -Database mydb -Role db_owner -DatabaseUser 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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = Get-Content C:\servers.txt </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </maml:para></maml:introduction><dev:code> $db = Get-DbaDataabse -SqlInstance localhost -Database DEMODB </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </maml:para></maml:introduction><dev:code> $roles = Get-DbaDbRole -SqlInstance localhost -Role "db_datareader","db_datawriter" </dev:code><dev:remarks><maml:para> PS C:\&gt; $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-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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-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: Database, User, Login, Security
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-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:\&gt; </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:\&gt; </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:\&gt; </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-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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-DbaServerRole</command:name><command:noun>DbaServerRole</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-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 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>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 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: ServerRole, Instance, Security
Author: Claudio Silva (@ClaudioESSilva), https://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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Remove-DbaServerRole -SqlInstance Server1 -Database db1 -Confirm:$false </dev:code><dev:remarks><maml:para> Suppresses all prompts to remove the server-role in the 'Server1'. </maml:para></dev:remarks></command:example></command:examples></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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), http://www.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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: Security, 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:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:
- &lt;DBN&gt; current database name
- &lt;DATE&gt; 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:
- &lt;FGN&gt; current filegroup name
- &lt;DBN&gt; current database name
- &lt;DATE&gt; 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:
- &lt;FT&gt; file type (ROWS, LOG)
- &lt;LGN&gt; current logical name
- &lt;FGN&gt; current filegroup name
- &lt;DBN&gt; current database name
- &lt;DATE&gt; 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:
- &lt;FNN&gt; current file name (the basename, without directory nor extension)
- &lt;FT&gt; file type (ROWS, LOG, MMO, FS)
- &lt;LGN&gt; current logical name
- &lt;FGN&gt; current filegroup name
- &lt;DBN&gt; current database name
- &lt;DATE&gt; 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 '&lt;DBN&gt;&lt;FNN&gt;'
would end up with this logic:
- database --&gt; no placeholders specified
- dbatools_HR to dbatools_HRARCHIVE
- filenames placeholders specified
&lt;DBN&gt;&lt;FNN&gt; --&gt; 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 '&lt;DBN&gt;&lt;FNN&gt;' -ReplaceBefore
end up with this logic instead:
- database --&gt; no placeholders specified
- dbatools_HR to dbatools_HRARCHIVE
- filenames placeholders specified,
&lt;DBN&gt;&lt;FNN&gt;, plus -ReplaceBefore --&gt; 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:
- &lt;DBN&gt; current database name
- &lt;DATE&gt; 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:
- &lt;FGN&gt; current filegroup name
- &lt;DBN&gt; current database name
- &lt;DATE&gt; 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:
- &lt;FT&gt; file type (ROWS, LOG)
- &lt;LGN&gt; current logical name
- &lt;FGN&gt; current filegroup name
- &lt;DBN&gt; current database name
- &lt;DATE&gt; 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:
- &lt;FNN&gt; current file name (the basename, without directory nor extension)
- &lt;FT&gt; file type (ROWS, LOG, MMO, FS)
- &lt;LGN&gt; current logical name
- &lt;FGN&gt; current filegroup name
- &lt;DBN&gt; current database name
- &lt;DATE&gt; 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 '&lt;DBN&gt;&lt;FNN&gt;'
would end up with this logic:
- database --&gt; no placeholders specified
- dbatools_HR to dbatools_HRARCHIVE
- filenames placeholders specified
&lt;DBN&gt;&lt;FNN&gt; --&gt; 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 '&lt;DBN&gt;&lt;FNN&gt;' -ReplaceBefore
end up with this logic instead:
- database --&gt; no placeholders specified
- dbatools_HR to dbatools_HRARCHIVE
- filenames placeholders specified,
&lt;DBN&gt;&lt;FNN&gt;, plus -ReplaceBefore --&gt; 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:
- &lt;DBN&gt; current database name
- &lt;DATE&gt; 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:
- &lt;FGN&gt; current filegroup name
- &lt;DBN&gt; current database name
- &lt;DATE&gt; 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:
- &lt;FNN&gt; current file name (the basename, without directory nor extension)
- &lt;FT&gt; file type (ROWS, LOG, MMO, FS)
- &lt;LGN&gt; current logical name
- &lt;FGN&gt; current filegroup name
- &lt;DBN&gt; current database name
- &lt;DATE&gt; 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:
- &lt;FT&gt; file type (ROWS, LOG)
- &lt;LGN&gt; current logical name
- &lt;FGN&gt; current filegroup name
- &lt;DBN&gt; current database name
- &lt;DATE&gt; 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 '&lt;DBN&gt;&lt;FNN&gt;'
would end up with this logic:
- database --&gt; no placeholders specified
- dbatools_HR to dbatools_HRARCHIVE
- filenames placeholders specified
&lt;DBN&gt;&lt;FNN&gt; --&gt; 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 '&lt;DBN&gt;&lt;FNN&gt;' -ReplaceBefore
end up with this logic instead:
- database --&gt; no placeholders specified
- dbatools_HR to dbatools_HRARCHIVE
- filenames placeholders specified,
&lt;DBN&gt;&lt;FNN&gt;, plus -ReplaceBefore --&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName "dbatools_&lt;DBN&gt;" </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:\&gt; </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName "dbatools_&lt;DBN&gt;_&lt;DATE&gt;" </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:\&gt; </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -FileGroupName "dbatools_&lt;FGN&gt;" </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:\&gt; </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName "dbatools_&lt;DBN&gt;" -FileGroupName "&lt;DBN&gt;_&lt;FGN&gt;" </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:\&gt; </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -FileGroupName "dbatools_&lt;DBN&gt;_&lt;FGN&gt;" </dev:code><dev:remarks><maml:para> PS C:\&gt; Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName "dbatools_&lt;DBN&gt;"

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:\&gt; </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName "dbatools_&lt;DBN&gt;" -FileName "&lt;DBN&gt;_&lt;FGN&gt;_&lt;FNN&gt;" </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:\&gt; </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName "dbatools_&lt;DBN&gt;" -FileName "&lt;DBN&gt;_&lt;FGN&gt;_&lt;FNN&gt;" -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:\&gt; </maml:para></maml:introduction><dev:code> Rename-DbaDatabase -SqlInstance sqlserver2014a -Database HR -DatabaseName "dbatools_&lt;DBN&gt;" -FileName "&lt;DBN&gt;_&lt;FGN&gt;_&lt;FNN&gt;" -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 login and database mapping for a specified login.</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: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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>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:\&gt; </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:\&gt; </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:\&gt; </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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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
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:\&gt; </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:\&gt; </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:\&gt; </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, System.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
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:\&gt; </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:\&gt; </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:\&gt; </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><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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, 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:\&gt; </maml:para></maml:introduction><dev:code> Resolve-DbaNetworkName -ComputerName ServerA </dev:code><dev:remarks><maml:para> Returns a custom object displaying InputName, ComputerName, IPAddress, DNSHostName, DNSDomain, Domain, DNSHostEntry, FQDN, DNSHostEntry for ServerA </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 2 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> Resolve-DbaNetworkName -SqlInstance sql2016\sqlexpress </dev:code><dev:remarks><maml:para> Returns a custom object displaying InputName, ComputerName, IPAddress, DNSHostName, DNSDomain, Domain, DNSHostEntry, FQDN, DNSHostEntry for the SQL instance sql2016\sqlexpress </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 3 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </maml:para></maml:introduction><dev:code> Resolve-DbaNetworkName -SqlInstance sql2016\sqlexpress, sql2014 </dev:code><dev:remarks><maml:para> Returns a custom object displaying InputName, ComputerName, IPAddress, DNSHostName, DNSDomain, Domain, DNSHostEntry, FQDN, DNSHostEntry for the SQL instance sql2016\sqlexpress and sql2014 </maml:para></dev:remarks></command:example><command:example><maml:title> -------------------------- EXAMPLE 4 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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, Domain, FQDN 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><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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>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>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"</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.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>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, 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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 non 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 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="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="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>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>OutputScriptOnly</maml:name><maml:description><maml:para>Switch indicates that ONLY T-SQL scripts should be generated, no restore takes place</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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>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>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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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>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 switch set and occurrence of the original database's name in a data or log file will be replace 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>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 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="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="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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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>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 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="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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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>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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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>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>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>OutputScriptOnly</maml:name><maml:description><maml:para>Switch indicates that ONLY T-SQL scripts should be generated, no restore takes place</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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 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>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 switch set and occurrence of the original database's name in a data or log file will be replace 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 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>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>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>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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $RestoreTime = Get-Date('11:19 23/12/2016') </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; $result | Select-Object -ExpandProperty Tsql | Out-File -Filepath c:\scripts\restore.sql

Scans all the backup files in \\server2\backups stored in an Ola Hallengren style folder structure,
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $File = Get-ChildItem c:\backups, \\server1\backups -recurse </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </maml:para></maml:introduction><dev:code> $files = Get-ChildItem C:\dbatools\db1 </dev:code><dev:remarks><maml:para> PS C:\&gt; $params = @{
&gt;&gt; SqlInstance = 'server\instance1'
&gt;&gt; DestinationFilePrefix = 'prefix'
&gt;&gt; DatabaseName ='Restored'
&gt;&gt; RestoreTime = (get-date "14:58:30 22/05/2017")
&gt;&gt; NoRecovery = $true
&gt;&gt; WithReplace = $true
&gt;&gt; StandbyDirectory = 'C:\dbatools\standby'
&gt;&gt; }
&gt;&gt;
PS C:\&gt; $files | Restore-DbaDatabase @params
PS C:\&gt; Invoke-DbaQuery -SQLInstance server\instance1 -Query "select top 1 * from Restored.dbo.steps order by dt desc"
PS C:\&gt; $params.RestoredTime = (get-date "15:09:30 22/05/2017")
PS C:\&gt; $params.NoRecovery = $false
PS C:\&gt; $params.Add("Continue",$true)
PS C:\&gt; $files | Restore-DbaDatabase @params
PS C:\&gt; Invoke-DbaQuery -SQLInstance server\instance1 -Query "select top 1 * from restored.dbo.steps order by dt desc"
PS C:\&gt; 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:\&gt; </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:\&gt; 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:\&gt; </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:\&gt; $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:\&gt; </maml:para></maml:introduction><dev:code> $BackupHistory = Get-DbaBackupInformation -SqlInstance sql2005 -Path \\backups\sql2000\ProdDb </dev:code><dev:remarks><maml:para> PS C:\&gt; $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 &gt; 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:\&gt; </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:\&gt; Rename-DbaDatabase -SqlInstance server1\instance1 -Database "DevOps_DEV" -LogicalName "&lt;DBN&gt;_&lt;FT&gt;"

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:\&gt; </maml:para></maml:introduction><dev:code> $FileStructure = @{ </dev:code><dev:remarks><maml:para> &gt;&gt; 'database_data' = 'C:\Data\database_data.mdf'
&gt;&gt; 'database_log' = 'C:\Log\database_log.ldf'
&gt;&gt; }
&gt;&gt;
PS C:\&gt; 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: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 (ByValue)" 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.Object[]</command: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>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="4" 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="5" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SecurePassword</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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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>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.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml: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 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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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: Migration, Certificate
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:\&gt; </maml:para></maml:introduction><dev:code> $securepass = Get-Credential usernamedoesntmatter | Select-Object -ExpandProperty Password </dev:code><dev:remarks><maml:para> PS C:\&gt; Restore-DbaDbCertificate -SqlInstance Server1 -Path \\Server1\Certificates -SecurePassword $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:\&gt; </maml:para></maml:introduction><dev:code> Restore-DbaDbCertificate -SqlInstance Server1 -Path \\Server1\Certificates\DatabaseTDE.cer -SecurePassword (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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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 resumeed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</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 resumeed.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml: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: AvailabilityGroup, HA, AG, Replica
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:\&gt; </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:\&gt; </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: AvailabilityGroup, HA, AG, 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:\&gt; </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:\&gt; </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:\&gt; </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-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: Diagnostic, DMV, Troubleshooting
Author: Andre Kamman (@AndreKamman), http://clouddba.io

Website: https://dbatools.io
Copyright: (c) 2018 by dbatools, licensed under MIT
License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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="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">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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.

This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.

Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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">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>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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: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:\&gt; </maml:para></maml:introduction><dev:code> $Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\server1\backups$ </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </maml:para></maml:introduction><dev:code> $Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\server1\backups$ </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </maml:para></maml:introduction><dev:code> $Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\server1\backups$ </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </maml:para></maml:introduction><dev:code> $Backups = Get-DbaBackupInformation -SqlInstance Server1 -Path \\server1\backups$ </dev:code><dev:remarks><maml:para> PS C:\&gt; $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>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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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, https://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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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. By default, the target login will be 'sa',</maml:para><maml:para>but the the user may specify a different login for ownership. This be applied to all jobs or only to a select collection of jobs.</maml:para><maml:para>Best practice reference: http://sqlmag.com/blog/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), http://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:description><command:syntax><command:syntaxItem><maml:name>Set-DbaAgentJobStep</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="1" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml: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="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 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 "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 "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 "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. The default is '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="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. The default is '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="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="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>Enables piping job objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.JobStep[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.JobStep[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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 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">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml: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. The default is '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: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>Enables piping job objects</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Microsoft.SqlServer.Management.Smo.Agent.JobStep[]</command:parameterValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Agent.JobStep[]</maml:name><maml: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>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 "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 "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. 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>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 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: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-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 are 1, "Once", 4, "Daily", 8, "Weekly", 16, "Monthly", 32, "MonthlyRelative", 64, "AgentStart", 128 or "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="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 are 1, "Sunday", 2, "Monday", 4, "Tuesday", 8, "Wednesday", 16, "Thursday", 32, "Friday", 64, "Saturday", 62, "Weekdays", 65, "Weekend", 127, "EveryDay".
If 62, "Weekdays", 65, "Weekend", 127, "EveryDay" is used it overwwrites any other value that has been passed before.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</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>FrequencySubdayType</maml:name><maml:description><maml:para>Specifies the units for the subday FrequencyInterval.
Allowed values are 1, "Time", 2, "Seconds", 4, "Minutes", 8 or "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="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 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="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 are 1, "Sunday", 2, "Monday", 4, "Tuesday", 8, "Wednesday", 16, "Thursday", 32, "Friday", 64, "Saturday", 62, "Weekdays", 65, "Weekend", 127, "EveryDay".
If 62, "Weekdays", 65, "Weekend", 127, "EveryDay" is used it overwwrites any other value that has been passed before.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml: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 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>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, "Time", 2, "Seconds", 4, "Minutes", 8 or "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>FrequencyType</maml:name><maml:description><maml:para>A value indicating when a job is to be executed.
Allowed values are 1, "Once", 4, "Daily", 8, "Weekly", 16, "Monthly", 32, "MonthlyRelative", 64, "AgentStart", 128 or "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>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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</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). If you want to turn it off use the value -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="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. If you want to turn it off use the value 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="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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml: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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml: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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml: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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml: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). If you want to turn it off use the value -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>MaximumJobHistoryRows</maml:name><maml:description><maml:para>Indicates the Maximum job history rows per job. If you want to turn it off use the value 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>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: Cláudio Silva (@claudioessilva), https://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: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.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 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.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>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: AvailabilityGroup, HA, AG, Listener
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:\&gt; </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:\&gt; </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="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>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: AvailabilityGroup, HA, AG, Replica
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:\&gt; </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:\&gt; </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: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. Basic availability groups like pumpkin spice and uggs.

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. Basic availability groups like pumpkin spice and uggs.

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: AvailabilityGroup, HA, AG
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Get-DbaCmConnection | Export-Clixml .\connections.xml </dev:code><dev:remarks><maml:para> PS C:\&gt; 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>TargetCompatibility</maml:name><maml:description><maml:para>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="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)</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:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>TargetCompatibility</maml:name><maml:description><maml:para>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, http://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:\&gt; </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:\&gt; </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:\&gt; </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.Object[]</command: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>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">System.Object</command: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>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="6" 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="7" 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">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml: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>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: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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Set-DbaDbCompression -SqlInstance ServerA -Database DBName -CompressionType Page </dev:code><dev:remarks><maml:para> Utilizes Page compression for all objects 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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $testCompression = Test-DbaDbCompression -SqlInstance ServerA -Database DBName </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> $servers = 'Server1','Server2' </dev:code><dev:remarks><maml:para> PS C:\&gt; foreach ($svr in $servers) {
&gt;&gt; Set-DbaDbCompression -SqlInstance $svr -MaxRunTime 60 -PercentCompression 25 | Export-Csv -Path C:\temp\CompressionAnalysisPAC.csv -Append
&gt;&gt; }

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-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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; '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:\&gt; </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:\&gt; $IdentityTables = Invoke-DbaQuery -SqlInstance SQLServer2017 -Database AdventureWorks2014 -Query $query
PS C:\&gt; foreach ($tbl in $IdentityTables) {
PS C:\&gt; Set-DbaDbIdentity -SqlInstance SQLServer2017 -Database AdventureWorks2014 -Table $tbl.TableName
PS C:\&gt; }

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 fqdn.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</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 fqdn.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</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 fqdn.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml: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 fqdn.</maml:para></maml:description><command:parameterValue required="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: 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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), http://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $db = Get-DbaDatabase -SqlInstance localhost -Database db1, db2 </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-DbaQueryStoreOptions</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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 user databases.</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), https://www.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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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 uses databases MODEL database 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:\&gt; </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-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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-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:\&gt; </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:\&gt; </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
Author: Shawn Melton (@wsmelton), https://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:\&gt; </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:\&gt; </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:\&gt; </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-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.</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 will only be used in conjunction with the -SecurePassword parameter.
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>MustChange</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.
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>Should the password policy be enforced.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>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>MustChange</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.
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>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>PasswordPolicyEnforced</maml:name><maml:description><maml:para>Should the password policy be enforced.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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 will only be used in conjunction with the -SecurePassword parameter.
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:\&gt; </maml:para></maml:introduction><dev:code> $SecurePassword = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force </dev:code><dev:remarks><maml:para> PS C:\&gt; $cred = New-Object System.Management.Automation.PSCredential ("username", $SecurePassword)
PS C:\&gt; Set-DbaLogin -SqlInstance sql1 -Login login1 -SecurePassword $cred -Unlock -MustChange

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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $login = Get-DbaLogin -SqlInstance sql1 -Login test </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </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: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="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 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, SpConfigure
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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>http://sqlmag.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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>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
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:\&gt; </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:\&gt; </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-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 custom power plan that is considered best practice, specify -CustomPowerPlan.</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="false" 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="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml: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="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>PowerPlan</maml:name><maml:description><maml:para>Specifies the Power Plan that you wish to use. Valid options for this match the Windows default Power Plans of "Power Saver", "Balanced", and "High Performance".</maml:para></maml:description><command:parameterValue required="false" variableLength="true">String</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>CustomPowerPlan</maml:name><maml:description><maml:para>Specifies the name of a custom Power Plan 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="4" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaPowerPlan</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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>CustomPowerPlan</maml:name><maml:description><maml:para>Specifies the name of a custom Power Plan 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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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-DbaPowerPlan</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>PowerPlan</maml:name><maml:description><maml:para>Specifies the Power Plan that you wish to use. Valid options for this match the Windows default Power Plans of "Power Saver", "Balanced", and "High Performance".</maml:para></maml:description><command:parameterValue required="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
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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential 'Domain\User' </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> Set-DbaPowerPlan -ComputerName sqlcluster -CustomPowerPlan 'Maximum Performance' </dev:code><dev:remarks><maml:para> Sets the Power Plan to the custom power plan called "Maximum Performance". Skips it if its already set. </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' 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' and/or 'BatchLogon' for local privileges 'Instant File Initialization', 'Lock Pages in Memory' and 'Logon as Batch'.</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>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' and/or 'BatchLogon' for local privileges 'Instant File Initialization', 'Lock Pages in Memory' and 'Logon as Batch'.</maml:para></maml:description><command:parameterValue required="false" variableLength="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: Privilege
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:\&gt; </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:\&gt; </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-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, https://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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), http://www.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:\&gt; </maml:para></maml:introduction><dev:code> Set-DbaSpn -SPN MSSQLSvc/SQLSERVERA.domain.something -ServiceAccount domain\account </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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">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>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 filegroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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 filegroup.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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">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>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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $StartupConfig = Get-DbaStartupParameter -SqlInstance server1\instance1 </dev:code><dev:remarks><maml:para> PS C:\&gt; Set-DbaStartupParameter -SqlInstance server1\instance1 -SingleUser -NoLoggingToWinEvents
PS C:\&gt; #Restart your SQL instance with the tool of choice
PS C:\&gt; #Do Some work
PS C:\&gt; Set-DbaStartupParameter -SqlInstance server1\instance1 -StartupConfig $StartupConfig
PS C:\&gt; #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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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: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>Which IpAddress should the portchange , 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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>IpAddress</maml:name><maml:description><maml:para>Which IpAddress should the portchange , 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: Service, Port, 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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Set-DbaTcpPort -SqlInstance sql2017, sql2019 -port 1337 -Credential ad\dba </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. </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, with a log file 25% of the total data file size.</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, this will be set to 25% of total data file 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="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 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">String</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>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 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">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml: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, this will be set to 25% of total data file 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>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, Space, Configure, Configuration
Author: Michael Fal (@Mike_Fal), http://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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>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:\&gt; </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:\&gt; </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:\&gt; </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
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:\&gt; </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:\&gt; </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>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>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>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>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>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>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>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>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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: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-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:\&gt; </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:\&gt; </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:\&gt; </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 (if you didn't specify -ExcludeBackupCleanup).

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 &amp; 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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml: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>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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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 (if you didn't specify -ExcludeBackupCleanup).

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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.String[]</command:parameterValue><dev:type><maml:name>System.String[]</maml:name><maml: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>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 &amp; 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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $params = @{ </dev:code><dev:remarks><maml:para> &gt;&gt; Source = "sqlcluster"
&gt;&gt; Destination = "sql2016"
&gt;&gt; SourceSqlCredential = $scred
&gt;&gt; DestinationSqlCredential = $cred
&gt;&gt; SharedPath = "\\fileserver\share\sqlbackups\Migration"
&gt;&gt; BackupRestore = $true
&gt;&gt; ReuseSourceFolderStructure = $true
&gt;&gt; Force = $true
&gt;&gt; }
&gt;&gt;
PS C:\&gt; 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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $PSDefaultParameters = @{ </dev:code><dev:remarks><maml:para> &gt;&gt; "dbatools:Source" = "sqlcluster"
&gt;&gt; "dbatools:Destination" = "sql2016"
&gt;&gt; }
&gt;&gt;
PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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>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>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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: Security, 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:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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>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>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>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>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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt;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:\&gt; </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:\&gt;$params = @{
&gt;&gt; SmtpServer = "smtp.ad.local"
&gt;&gt; To = "admin@ad.local"
&gt;&gt; Sender = "reports@ad.local"
&gt;&gt; Subject = "Query executed"
&gt;&gt; Body = "Query executed at {collection_time}"
&gt;&gt; Attachment = "batch_text"
&gt;&gt; AttachmentFileName = "query.sql"
&gt;&gt; }
PS C:\&gt; $emailresponse = New-DbaXESmartEmail @params
PS C:\&gt; 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:\&gt; </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:\&gt; $response = New-DbaXESmartTableWriter -SqlInstance sql2017 -Database dbadb -Table deadlocktracker -OutputColumns $columns -Filter "duration &gt; 10000"
PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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-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:\&gt; </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:\&gt; </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:\&gt; </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-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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: Processes
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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>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>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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: Security, 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:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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:\&gt; </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:\&gt; </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:\&gt; </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)

Website: https://dbatools.io
Copyright: (c) 2018 by dbatools, licensed under MIT
License: MIT https://opensource.org/licenses/MIT </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </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
https://github.com/spaghettidba/XESmartTarget/wiki</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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: AvailabilityGroup, HA, AG, Replica
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:\&gt; </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:\&gt; </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="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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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: AvailabilityGroup, HA, AG
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: http://sqlmag.com/blog/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), http://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:\&gt; </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:\&gt; </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:\&gt; </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-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:\&gt; </maml:para></maml:introduction><dev:code> $BackupHistory | Test-DbaBackupInformation -SqlInstance MyInstance </dev:code><dev:remarks><maml:para> PS C:\&gt; $PassedDbs = $BackupHistory | Where-Object {$_.IsVerified -eq $True}
PS C:\&gt; $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
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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-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 SQL Server Instance to test connection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml: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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command: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 test connection</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml: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, Test, 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:\&gt; </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
```

Test connection to SQL2016 and outputs information collected </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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.Object[]</command: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>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.Object[]</command:parameterValue><dev:type><maml:name>System.Object[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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>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, 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = 'Server1','Server2' </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential sqladmin </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> $servers = 'Server1','Server2' </dev:code><dev:remarks><maml:para> PS C:\&gt; foreach ($svr in $servers) {
&gt;&gt; Test-DbaDbCompression -SqlInstance $svr | Export-Csv -Path C:\temp\CompressionAnalysisPAC.csv -Append
&gt;&gt; }

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: Data generation, testing
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:\&gt; </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: Data masking, Testing
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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), http://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:\&gt; </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:\&gt; </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:\&gt; </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-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
License: GNU GPL v3 https://opensource.org/licenses/GPL-3.0 </maml:para></maml:alert></maml:alertSet><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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>Returns $true or $false by default for one server. Returns Server name and IsBestPractice for more than one server.</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
Author: Constantine Kokkinos (@mobileck), https://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:\&gt; </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:\&gt; </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: CIM, Storage
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:\&gt; </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:\&gt; </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:\&gt; </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>Tests how disks are performing.</maml:para></maml:description></command:details><maml:description><maml:para>Tests how disks are performing.</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: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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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: 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:\&gt; </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:\&gt; </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: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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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, ServerName
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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>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">System.Object</command: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>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="9" 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="10" 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>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="11" 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="12" 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>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>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>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">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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>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>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>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>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: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 ( https://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $servers = "sql2016","sql2014","sql2012" </dev:code><dev:remarks><maml:para> PS C:\&gt; $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:\&gt; </maml:para></maml:introduction><dev:code> $servers | Get-DbaLinkedServer | Test-DbaLinkedServerConnection </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: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, Security
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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), http://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:\&gt; </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-SqlInstance/),</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, SpConfigure
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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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: Path, ServiceAccount
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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> $credential = Get-Credential </dev:code><dev:remarks><maml:para> PS C:\&gt; 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. 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://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="false" 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="false" variableLength="true">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml: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="2" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>CustomPowerPlan</maml:name><maml:description><maml:para>If your organization uses a custom 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="3" pipelineInput="True (ByValue)" aliases="" variableLength="true" globbing="false"><maml:name>InputObject</maml:name><maml:description><maml:para>Enables piping from Get-DbaPowerPlan</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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>CustomPowerPlan</maml:name><maml:description><maml:para>If your organization uses a custom 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: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-DbaPowerPlan</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:parameters><maml:alertSet><maml:title></maml:title><maml:alert><maml:para> Tags: PowerPlan
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:\&gt; </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:\&gt; </maml:para></maml:introduction><dev:code> Test-DbaPowerPlan -ComputerName sqlserver2014a -CustomPowerPlan '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 custom plan "Maximum Performance". </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: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:\&gt; </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:\&gt; </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:\&gt; </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), http://www.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:\&gt; </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:\&gt; </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:\&gt; </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), http://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:\&gt; </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:\&gt; </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:\&gt; </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-DbaTempddbConfig</maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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, Security
Author: Stephen Bennett, https://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:\&gt; </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:\&gt; </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:\&gt; </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: SqlWatch
Author: Ken K (github.com/koglerk)
Website: https://sqlwatch.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:\&gt; </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: JustForFun, 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:\&gt; </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 setings 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><command:examples><command:example><maml:title> -------------------------- EXAMPLE 1 -------------------------- </maml:title><maml:introduction><maml:para> PS C:\&gt; </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:\&gt; </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:\&gt; </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></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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 and 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>Credentials are a required parameter for remote machines. Without specifying -Credential, the installation will fail due to lack of permissions.</maml:para><maml:para>CredSSP is a recommended transport for running the updates remotely. Update-DbaInstance will attempt to reconfigure</maml:para><maml:para>local and remote hosts to support CredSSP, which is why it is desirable to run this command in an elevated console at all times.</maml:para><maml:para>CVE-2018-0886 security update is required for both local and remote hosts. If CredSSP connections are failing, make sure to</maml:para><maml:para>apply recent security updates prior to doing anything else.</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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml: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: &lt;MajorVersion&gt;&lt;SPX&gt;&lt;CUX&gt;.
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.
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>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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="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.</maml:para></maml:description><command:parameterValue required="false" variableLength="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.
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>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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><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">Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</command:parameterValue><dev:type><maml:name>Sqlcollaborative.Dbatools.Parameter.DbaInstanceParameter[]</maml:name><maml: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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" position="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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>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: &lt;MajorVersion&gt;&lt;SPX&gt;&lt;CUX&gt;.
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: Install, Patching, SP, CU, Instance
Author: Kirill Kravtsov (@nvarscar) https://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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:\&gt; </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:examples></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>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:\&gt; </maml:para></maml:introduction><dev:code> $SecurePassword = ConvertTo-SecureString 'Qwerty1234' -AsPlainText -Force </dev:code><dev:remarks><maml:para> 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:\&gt; </maml:para></maml:introduction><dev:code> $cred = Get-Credential </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </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:\&gt; </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:examples></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns: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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><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: 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:\&gt; </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:\&gt; </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:description><command:syntax><command:syntaxItem><maml:name>Watch-DbaDbLogin</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 that stores the Watch database.</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>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="2" 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="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>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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml:uri /></dev:type><dev:defaultValue></dev: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>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:\&gt; </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:\&gt; </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:\&gt; </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: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: JustForFun, 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:\&gt; </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="named" pipelineInput="False" aliases="" variableLength="true" globbing="false"><maml:name>SqlCredential</maml:name><maml:description><maml:para>Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).

Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.

For MFA support, please use Connect-DbaInstance.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Pscredential</command:parameterValue><dev:type><maml:name>Pscredential</maml:name><maml: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>Raw</maml:name><maml:description><maml:para>If this switch is enabled, the Microsoft.SqlServer.XEvent.Linq.QueryableXEventData 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:syntaxItem><maml:name>Watch-DbaXESession</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">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>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>Raw</maml:name><maml:description><maml:para>If this switch is enabled, the Microsoft.SqlServer.XEvent.Linq.QueryableXEventData 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:syntaxItem><maml:name>Watch-DbaXESession</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">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>Accepts an XESession object returned 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>Raw</maml:name><maml:description><maml:para>If this switch is enabled, the Microsoft.SqlServer.XEvent.Linq.QueryableXEventData 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 Microsoft.SqlServer.XEvent.Linq.QueryableXEventData 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:\&gt; </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:\&gt; </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:\&gt; </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 to import the table 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="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.</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 with inefficient data types.

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 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>NotifyAfter</maml:name><maml:description><maml:para>Sets the option to show the notification after so many rows of import</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml: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>EnableException</maml:name><maml:description><maml:para>By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Switch</command:parameterValue><dev:type><maml:name>Switch</maml:name><maml: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 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>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 import the table 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>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.</maml:para></maml:description><command:parameterValue required="false" variableLength="true">System.Object</command:parameterValue><dev:type><maml:name>System.Object</maml:name><maml: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</maml:para></maml:description><command:parameterValue required="false" variableLength="true">Int</command:parameterValue><dev:type><maml:name>Int</maml:name><maml: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 with inefficient data types.

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: DataTable, 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:\&gt; </maml:para></maml:introduction><dev:code> $DataTable = Import-Csv C:\temp\customers.csv </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> $tableName = "MyTestData" </dev:code><dev:remarks><maml:para> PS C:\&gt; $query = "SELECT name, create_date, owner_sid FROM sys.databases"
PS C:\&gt; $dataset = Invoke-DbaQuery -SqlInstance 'localhost,1417' -SqlCredential $containerCred -Database master -Query $query
PS C:\&gt; $dataset | Select-Object name, create_date, @{L="owner_sid";E={$_."owner_sid"}} | Write-DbaDbTableData -SqlInstance 'localhost,1417' -SqlCredential $containerCred -Database tempdb -Table myTestData -Schema dbo -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:\&gt; </maml:para></maml:introduction><dev:code> $DataTable = Import-Csv C:\temp\customers.csv </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> $DataTable = Import-Csv C:\temp\customers.csv </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> $DataTable = Import-Csv C:\temp\customers.csv </dev:code><dev:remarks><maml:para> PS C:\&gt; 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:\&gt; </maml:para></maml:introduction><dev:code> $passwd = ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force </dev:code><dev:remarks><maml:para> PS C:\&gt; $AzureCredential = New-Object System.Management.Automation.PSCredential("AzureAccount"),$passwd)
PS C:\&gt; $DataTable = Import-Csv C:\temp\customers.csv
PS C:\&gt; Write-DbaDbTableData -SqlInstance AzureDB.database.windows.net -InputObject $DataTable -Database mydb -Table customers -KeepNulls -Credential $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:\&gt; </maml:para></maml:introduction><dev:code> $process = Get-Process </dev:code><dev:remarks><maml:para> PS C:\&gt; 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 charcters like " must be escaped by a ` charcter.
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: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>