<?xml version="1.0" encoding="utf-8" ?>

<helpItems xmlns="http://msh" 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" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Add-SqlAvailabilityDatabase</command:name><maml:description><maml:para>Adds one or more primary databases or joins one or more secondary databases to the availability group specified in the InputObject or Path parameter.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Add</command:verb><command:noun>SqlAvailabilityDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>The Add-SqlAvailabilityDatabase cmdlet adds one or more primary databases or joins one or more secondary databases or to the availability group specified in either the InputObject or Path parameter.
</maml:para><maml:para>To add one or more databases to an availability group, execute this cmdlet at the server instance that hosts the primary replica and specify one or more local user databases.
</maml:para><maml:para>To join a secondary database to the availability group, manually prepare the secondary database on the server instance that hosts the secondary replica, and then execute this cmdlet at the server instance that hosts the secondary replica.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-SqlAvailabilityDatabase</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>Specifies an array of one or more user databases to add or join to the availability group specified in the Path or InputObject parameter. These databases must reside on the local instance of SQL Server. Note that a given database can belong to only one availability group.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Add-SqlAvailabilityDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityGroup object of the availability group to which you are adding or joining databases.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>Specifies an array of one or more user databases to add or join to the availability group specified in the Path or InputObject parameter. These databases must reside on the local instance of SQL Server. Note that a given database can belong to only one availability group.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>Specifies an array of one or more user databases to add or join to the availability group specified in the Path or InputObject parameter. These databases must reside on the local instance of SQL Server. Note that a given database can belong to only one 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="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityGroup object of the availability group to which you are adding or joining databases.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group. This is an optional parameter. If not specified, the value of this parameter defaults to the current working 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> 

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


                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Add-SqlAvailabilityDatabase -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAG -Database "MyDatabase"


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command adds the database 'MyDatabase' to the availability group 'MyAG'. This command, which must be executed on the primary server instance of the availability group, does not prepare the secondary databases for data synchronization.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 

-------------------------- EXAMPLE 2 -------------------------- 


                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Add-SqlAvailabilityDatabase -Path SQLSERVER:\SQL\SecondaryServer\InstanceName\AvailabilityGroups\MyAG -Database "MyDatabase"


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command joins a secondary database, 'MyDatabase', to the availability group 'MyAG' on one of the server instances that hosts a secondary replica.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 

-------------------------- EXAMPLE 3 -------------------------- 


                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$DatabaseBackupFile = "\\share\backups\MyDatabase.bak"
$LogBackupFile = "\\share\backups\MyDatabase.trn"
$MyAgPrimaryPath = "SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg"
$MyAgSecondaryPath = "SQLSERVER:\SQL\SecondaryServer\InstanceName\AvailabilityGroups\MyAg"

Backup-SqlDatabase -Database "MyDatabase" -BackupFile $DatabaseBackupFile -ServerInstance "PrimaryServer\InstanceName"
Backup-SqlDatabase -Database "MyDatabase" -BackupFile $LogBackupFile -ServerInstance "PrimaryServer\InstanceName" -BackupAction 'Log'
Restore-SqlDatabase -Database "MyDatabase" -BackupFile $DatabaseBackupFile -ServerInstance "SecondaryServer\InstanceName" -NoRecovery
Restore-SqlDatabase -Database "MyDatabase" -BackupFile $LogBackupFile -ServerInstance "SecondaryServer\InstanceName" -RestoreAction 'Log' -NoRecovery

Add-SqlAvailabilityDatabase -Path $MyAgPrimaryPath -Database "MyDatabase"
Add-SqlAvailabilityDatabase -Path $MyAgSecondaryPath -Database "MyDatabase"


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This example shows the full process for preparing a secondary database from a database on the server instance that hosts the primary replica of an availability group, adding the database to an availability group (as a primary database), and then joining the secondary database to the availability group. First, the example backs up the database and its transaction log. Then the example restores the database and log backups to the server instances that host a secondary replica. The example calls Add-SqlAvailabilityDatabase twice: first on the primary replica to add the database to the availability group, and then on the secondary replica to join the secondary database on that replica to the availability group. If you have more than one secondary replica, restore and join the secondary database on each of them.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 

-------------------------- EXAMPLE 4 -------------------------- 


                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Add-SqlAvailabilityDatabase -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAG -Database "MyDatabase" -Script


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command outputs the Transact-SQL script that adds the database 'MyDatabase' to the availability group 'MyAG'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Adding a Database to an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: Joining a Secondary Replica to an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: Specifying the Endpoint URL for an Availability Replica (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Add-SqlAvailabilityGroupListenerStaticIp</command:name><maml:description><maml:para>Adds a static IP address to an existing availability group listener configuration.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Add</command:verb><command:noun>SqlAvailabilityGroupListenerStaticIp</command:noun><dev:version /></command:details><maml:description><maml:para>The Add-SqlAvailabilityGroupListenerStaticIp cmdlet adds a static IP address to an existing availability group listener configuration. Takes the AvailabilityGroupListener, the path, and the static IP address as parameters. The IP address can be an IPv4 address with subnet or an IPv6 address. This cmdlet can be executed only at the server instance that hosts the primary replica.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-SqlAvailabilityGroupListenerStaticIp</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group listener. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>The static IP addresses to be added to the availability group listener. This argument should be a list of strings. Each string can be either an IPv4 address and subnet mask in slash notation (for example, 192.168.1.1/255.255.255.0) or an IPv6 address.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Add-SqlAvailabilityGroupListenerStaticIp</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityGroupListener object of the listener to which you are adding the IP addresses.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>The static IP addresses to be added to the availability group listener. This argument should be a list of strings. Each string can be either an IPv4 address and subnet mask in slash notation (for example, 192.168.1.1/255.255.255.0) or an IPv6 address.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityGroupListener object of the listener to which you are adding the IP addresses.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group listener. This is an optional parameter. If not specified, the value of this parameter defaults to the current working 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>The static IP addresses to be added to the availability group listener. This argument should be a list of strings. Each string can be either an IPv4 address and subnet mask in slash notation (for example, 192.168.1.1/255.255.255.0) or an IPv6 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="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>



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



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$path = "SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityGroupListeners\MyListener"
Add-SqlAvailabilityGroupListenerStaticIp -Path $path -StaticIp "2001:0db8:85a3:0000:0000:8a2e:0370:7334"


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This example adds a static IPv4 address to the availability group listener 'MyListener' on the availability group 'MyAg'. This IPv4 address serves as the virtual IP address of the listener on the subnet 255.255.252.0. If the availability group spans multiple subnets, you should add a static IP address for each subnet to the listener. Add-SqlAvailabilityGroupListenerStaticIp commands must be executed on the server instance that hosts the primary replica.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 2 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$path = "SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityGroupListeners\MyListener"
Add-SqlAvailabilityGroupListenerStaticIp -Path $path -StaticIp "2001:0db8:85a3:0000:0000:8a2e:0370:7334"


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command adds a static IPv6 address to the listener 'MyListener' on the availability group 'MyAg'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 3 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$path = "SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityGroupListeners\MyListener"
Add-SqlAvailabilityGroupListenerStaticIp -Path $path -StaticIp "192.168.0.1/255.255.255.0" -Script


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command outputs a Transact-SQL script that adds a static IPv4 address to the listener 'MyListener' on the availability group 'MyAg'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Add-SqlFirewallRule</command:name><maml:description><maml:para>Adds a Windows Firewall rule to allow connections to a specific instance of SQL Server.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Add</command:verb><command:noun>SqlFirewallRule</command:noun><dev:version /></command:details><maml:description><maml:para>Adds a Windows Firewall rule to allow connections for the specified instance of SQL Server. </maml:para><maml:para>SQL Server Cloud Adapter must be running and accessible on the computer that hosts the instance of SQL Server.</maml:para><maml:para>This cmdlet supports the following modes of operation:</maml:para><maml:para>1. By specifying the instance PowerShell path.</maml:para><maml:para>2. By specifying the server object.</maml:para><maml:para>3. By specifying the ServerInstance of the target instance of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Add-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Add-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The server object of the target instance of SQL Server.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Add-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>This parameter specifies the name of an instance of SQL Server that becomes the target of the operation.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The server object of the target instance of SQL Server.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter defaults to the current working 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>This parameter specifies the name of an instance of SQL Server that becomes the target of the operation.</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" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;CD SQLSERVER:\SQL\Computer\Instance;
Add-SqlFirewallRule  -Credential $credential -AcceptSelfSignedCertificate;

</dev:code><dev:remarks><maml:para>This command adds a Windows Firewall rule on machine ‘Computer’ to allow connections to the instance of SQL Server ‘Instance’ on this machine. The current working directory is used to determine the server instance where the operation should occur. The self-signed certificate of the target machine will be automatically accepted without prompting the user.</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and adds Windows Firewall rules to allow connections for each one of them. The self-signed certificate of the target machine will be automatically accepted without prompting the user.
PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName "MachineName"  | Add-SqlFirewallRule  -Credential $credential -AcceptSelfSignedCertificate;

</dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Backup-SqlDatabase</command:name><maml:description><maml:para>The Backup-SqlDatabase cmdlet performs backup operations on a SQL Server database.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Backup</command:verb><command:noun>SqlDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>The Backup-SqlDatabase cmdlet performs backup operations on a SQL Server database. This includes full database backups, transaction log backups, and database file backups. This cmdlet is modeled after the Microsoft.SqlServer.Management.Smo.Backup class. The parameters on this class generally correspond to properties on that Smo object.
</maml:para><maml:para>This cmdlet supports four modes of operation to backup the database with the specified name on a server instance.
</maml:para><maml:para>1. Pass the path of a server instance to the -Path parameter and a database name to the -Database parameter.
</maml:para><maml:para>2. Pass a Smo.Server object to the -InputObject parameter, either directly or through the pipeline, and a database name to the -Database parameter.
</maml:para><maml:para>3. Pass the name of a server instance to the -ServerInstance parameter, and a database name to the -Database parameter.
</maml:para><maml:para>4. Pass a Smo.Database object to the -DatabaseObject parameter, either directly or through the pipeline.
</maml:para><maml:para>By default the cmdlet performs a full database backup. You can set the type of the backup by specifying the -BackupAction parameter.
</maml:para><maml:para>By default the backup file is stored in the default server backup location under the name "databasename.bak" for full and/or file backups and under "databasename.trn" for log backups.
</maml:para><maml:para>You can set the location and the file name of the backup file by specifying the -BackupFile parameter. Use the BackupFile parameter to specify a fully qualified backup file name that includes both the location and the name of the file.
</maml:para><maml:para>The BackupContainer parameter is used to set the location of the backup file. In this case the name of the backup file itself is auto generated. BackupContainer Use the BackupContainer parameter to specify just the location of the backup file. For more information, see BackupContainer parameter description.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Backup-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>The name of the database to be backed up. -Database cannot be used with the -DatabaseObject parameter. When
</maml:para><maml:para>the -Database parameter is specified, the -Path, -InputObject, or -ServerInstance parameter must also be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>The location and the file name of the backup. This is an optional parameter. If not specified, the backups are stored in the default backup location of the server under the name "databasename.bak" for full and file backups, or "databasename.trn" for log backups. This parameter cannot be used with the BackupDevice, or the BackupContainer parameter.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>The type of backup operation to be performed. Valid options are: Database, Files, or Log, as follows:
</maml:para><maml:para>Database: Backs up all the data files in the database.
</maml:para><maml:para>Files: Backs up specified data files. This requires the DatabaseFile or DatabaseFileGroup parameter to be set.
</maml:para><maml:para>Log: Backs up the transaction log.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>The folder or location where the backups are stored. This can be a folder on a disk or URL for a Windows Azure Blob container. This parameter can be useful when backing up multiple databases in a given instance. This parameter cannot be used with a BackupDevice parameter. The BackupContainer parameter cannot be used with the BackupFile parameter.
</maml:para><maml:para>Note: The path used to specify the location should end with a forward slash (/).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>The devices where the backups are stored. This parameter cannot be used with the BackupFile parameter. Use this parameter if you are backing up to tape.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>The optional description of the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>The name of the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>The physical block size for the backup, in bytes. The supported sizes are 512, 1024, 2048, 4096, 8192, 16384, 32768, and 65536 (64 KB) bytes. The default is 65536 for tape devices and 512 otherwise.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>The total number of I/O buffers to be used for the backup operation. You can specify any positive integer. Using many buffers might cause "out of memory" errors because of insufficient virtual address space in the Sqlservr.exe process.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>Calculates a checksum value during the backup operation. If not set, no checksum is calculated.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>The compression options for the backup operation. The options are Default, On, and Off.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>The operation continues when a checksum error occurs. If not set, the operation will fail after a checksum error.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>The backup is a copy-only backup. A copy-only backup does not affect the normal sequence of your regularly scheduled, conventional backups.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>One or more database files to be backed up. Only used  when the BackupAction property is set to Files. When the BackupAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>The database file groups targeted by the backup operation. Only used  when the BackupAction property is set to Files. When the BackupAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>The encryption options for the backup operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>The date and time when the backup set expires and the backup data is no longer considered valid. Can only be used for backup data stored on disk or tape devices. Backup sets older than the expiration date can be overwritten by a later backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>Formats the tape as the first step of the backup operation. Does not apply to a disk backup.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>Performs a differential backup.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>Devices associated with the backup operation are initialized. Overwrites any existing backup sets on the media and this backup becomes the first backup set on the media.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>The truncation behavior for log backups. Options are TruncateOnly, NoTruncate, or Truncate. By default, this option is set to Truncate.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>The maximum number of bytes to be transferred between the backup media and the instance of SQL Server. The possible values are multiples of 65536 bytes (64 KB), up to 4194304 bytes (4 MB).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>The optional description for the medium that contains the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>The name used to identify the media set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>Specifies an array of BackupDeviceList objects used by the mirrored backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>Does not back up the tail end of the log. When restored, the database is in the restoring state. When not set, the tail end of the log is backed up. Only applies when the -BackupAction parameter is set to Log.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>Leaves a tape drive open at the ending position when the backup completes. When not set, the tape is rewound after the operation completes. Does not apply to disk or URL backups.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>When set, outputs the Smo Backup object that performed the backup.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server on which you want to execute the backup operation. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>Continues processing a partially completed backup operation. If not set (default), the cmdlet restarts an interrupted backup operation at the beginning of the backup set.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>The number of days that must elapse before a backup set can be overwritten. Can only be used for backup data stored on disk or tape devices.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>Skips reading the tape header.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server Credential object stores authentication information. This is a required parameter when backing up to Windows Azure Blob storage service (URL). The authentication information stored includes Windows Azure storage account name and the associated access key values. This parameter is not used with Disk or Tape. You can either provide the name of the SQL Server credential or pass the object through a pipeline.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>The name of the undo file used to store uncommitted transactions that are rolled back during recovery.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>The tape device is rewound and unloaded when the operation finishes. If not set, no attempt is made to rewind and unload the tape medium. Does not apply to disk or URL backups.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Backup-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>DatabaseObject</maml:name><maml:description><maml:para>A database object. The backup operation will be performed on this database.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Database</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>The location and the file name of the backup. This is an optional parameter. If not specified, the backups are stored in the default backup location of the server under the name "databasename.bak" for full and file backups, or "databasename.trn" for log backups. This parameter cannot be used with the BackupDevice, or the BackupContainer parameter.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>The type of backup operation to be performed. Valid options are: Database, Files, or Log, as follows:
</maml:para><maml:para>Database: Backs up all the data files in the database.
</maml:para><maml:para>Files: Backs up specified data files. This requires the DatabaseFile or DatabaseFileGroup parameter to be set.
</maml:para><maml:para>Log: Backs up the transaction log.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>The folder or location where the backups are stored. This can be a folder on a disk or URL for a Windows Azure Blob container. This parameter can be useful when backing up multiple databases in a given instance. This parameter cannot be used with a BackupDevice parameter. The BackupContainer parameter cannot be used with the BackupFile parameter.
</maml:para><maml:para>Note: The path used to specify the location should end with a forward slash (/).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>The devices where the backups are stored. This parameter cannot be used with the BackupFile parameter. Use this parameter if you are backing up to tape.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>The optional description of the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>The name of the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>The physical block size for the backup, in bytes. The supported sizes are 512, 1024, 2048, 4096, 8192, 16384, 32768, and 65536 (64 KB) bytes. The default is 65536 for tape devices and 512 otherwise.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>The total number of I/O buffers to be used for the backup operation. You can specify any positive integer. Using many buffers might cause "out of memory" errors because of insufficient virtual address space in the Sqlservr.exe process.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>Calculates a checksum value during the backup operation. If not set, no checksum is calculated.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>The compression options for the backup operation. The options are Default, On, and Off.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>The operation continues when a checksum error occurs. If not set, the operation will fail after a checksum error.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>The backup is a copy-only backup. A copy-only backup does not affect the normal sequence of your regularly scheduled, conventional backups.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>One or more database files to be backed up. Only used  when the BackupAction property is set to Files. When the BackupAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>The database file groups targeted by the backup operation. Only used  when the BackupAction property is set to Files. When the BackupAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>The encryption options for the backup operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>The date and time when the backup set expires and the backup data is no longer considered valid. Can only be used for backup data stored on disk or tape devices. Backup sets older than the expiration date can be overwritten by a later backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>Formats the tape as the first step of the backup operation. Does not apply to a disk backup.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>Performs a differential backup.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>Devices associated with the backup operation are initialized. Overwrites any existing backup sets on the media and this backup becomes the first backup set on the media.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>The truncation behavior for log backups. Options are TruncateOnly, NoTruncate, or Truncate. By default, this option is set to Truncate.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>The maximum number of bytes to be transferred between the backup media and the instance of SQL Server. The possible values are multiples of 65536 bytes (64 KB), up to 4194304 bytes (4 MB).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>The optional description for the medium that contains the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>The name used to identify the media set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>Specifies an array of BackupDeviceList objects used by the mirrored backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>Does not back up the tail end of the log. When restored, the database is in the restoring state. When not set, the tail end of the log is backed up. Only applies when the -BackupAction parameter is set to Log.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>Leaves a tape drive open at the ending position when the backup completes. When not set, the tape is rewound after the operation completes. Does not apply to disk or URL backups.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>When set, outputs the Smo Backup object that performed the backup.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>Continues processing a partially completed backup operation. If not set (default), the cmdlet restarts an interrupted backup operation at the beginning of the backup set.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>The number of days that must elapse before a backup set can be overwritten. Can only be used for backup data stored on disk or tape devices.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>Skips reading the tape header.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server Credential object stores authentication information. This is a required parameter when backing up to Windows Azure Blob storage service (URL). The authentication information stored includes Windows Azure storage account name and the associated access key values. This parameter is not used with Disk or Tape. You can either provide the name of the SQL Server credential or pass the object through a pipeline.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>The name of the undo file used to store uncommitted transactions that are rolled back during recovery.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>The tape device is rewound and unloaded when the operation finishes. If not set, no attempt is made to rewind and unload the tape medium. Does not apply to disk or URL backups.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Backup-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>The name of the database to be backed up. -Database cannot be used with the -DatabaseObject parameter. When
</maml:para><maml:para>the -Database parameter is specified, the -Path, -InputObject, or -ServerInstance parameter must also be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>The location and the file name of the backup. This is an optional parameter. If not specified, the backups are stored in the default backup location of the server under the name "databasename.bak" for full and file backups, or "databasename.trn" for log backups. This parameter cannot be used with the BackupDevice, or the BackupContainer parameter.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>The type of backup operation to be performed. Valid options are: Database, Files, or Log, as follows:
</maml:para><maml:para>Database: Backs up all the data files in the database.
</maml:para><maml:para>Files: Backs up specified data files. This requires the DatabaseFile or DatabaseFileGroup parameter to be set.
</maml:para><maml:para>Log: Backs up the transaction log.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>The folder or location where the backups are stored. This can be a folder on a disk or URL for a Windows Azure Blob container. This parameter can be useful when backing up multiple databases in a given instance. This parameter cannot be used with a BackupDevice parameter. The BackupContainer parameter cannot be used with the BackupFile parameter.
</maml:para><maml:para>Note: The path used to specify the location should end with a forward slash (/).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>The devices where the backups are stored. This parameter cannot be used with the BackupFile parameter. Use this parameter if you are backing up to tape.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>The optional description of the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>The name of the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>The physical block size for the backup, in bytes. The supported sizes are 512, 1024, 2048, 4096, 8192, 16384, 32768, and 65536 (64 KB) bytes. The default is 65536 for tape devices and 512 otherwise.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>The total number of I/O buffers to be used for the backup operation. You can specify any positive integer. Using many buffers might cause "out of memory" errors because of insufficient virtual address space in the Sqlservr.exe process.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>Calculates a checksum value during the backup operation. If not set, no checksum is calculated.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>The compression options for the backup operation. The options are Default, On, and Off.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>The number of seconds to wait for a server connection before a time-out failure. The time-out value must be an integer between 0 and 65534. If 0 is specified, connection attempts do not time out.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>The operation continues when a checksum error occurs. If not set, the operation will fail after a checksum error.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>The backup is a copy-only backup. A copy-only backup does not affect the normal sequence of your regularly scheduled, conventional backups.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>A PSCredential object used to specify the credentials for a SQL Server login that has permission to perform this operation.

This is not the SQL Credential object that is used to store authentication information which is used internally by SQL Server when accessing resources outside SQL Server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>One or more database files to be backed up. Only used  when the BackupAction property is set to Files. When the BackupAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>The database file groups targeted by the backup operation. Only used  when the BackupAction property is set to Files. When the BackupAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>The encryption options for the backup operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>The date and time when the backup set expires and the backup data is no longer considered valid. Can only be used for backup data stored on disk or tape devices. Backup sets older than the expiration date can be overwritten by a later backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>Formats the tape as the first step of the backup operation. Does not apply to a disk backup.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>Performs a differential backup.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>Devices associated with the backup operation are initialized. Overwrites any existing backup sets on the media and this backup becomes the first backup set on the media.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>The truncation behavior for log backups. Options are TruncateOnly, NoTruncate, or Truncate. By default, this option is set to Truncate.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>The maximum number of bytes to be transferred between the backup media and the instance of SQL Server. The possible values are multiples of 65536 bytes (64 KB), up to 4194304 bytes (4 MB).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>The optional description for the medium that contains the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>The name used to identify the media set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>Specifies an array of BackupDeviceList objects used by the mirrored backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>Does not back up the tail end of the log. When restored, the database is in the restoring state. When not set, the tail end of the log is backed up. Only applies when the -BackupAction parameter is set to Log.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>Leaves a tape drive open at the ending position when the backup completes. When not set, the tape is rewound after the operation completes. Does not apply to disk or URL backups.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>When set, outputs the Smo Backup object that performed the backup.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>Continues processing a partially completed backup operation. If not set (default), the cmdlet restarts an interrupted backup operation at the beginning of the backup set.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>The number of days that must elapse before a backup set can be overwritten. Can only be used for backup data stored on disk or tape devices.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>Skips reading the tape header.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server Credential object stores authentication information. This is a required parameter when backing up to Windows Azure Blob storage service (URL). The authentication information stored includes Windows Azure storage account name and the associated access key values. This parameter is not used with Disk or Tape. You can either provide the name of the SQL Server credential or pass the object through a pipeline.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>The name of the undo file used to store uncommitted transactions that are rolled back during recovery.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>The tape device is rewound and unloaded when the operation finishes. If not set, no attempt is made to rewind and unload the tape medium. Does not apply to disk or URL backups.
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>The name of an instance of SQL Server. This server instance becomes the target of the backup operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Backup-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>The name of the database to be backed up. -Database cannot be used with the -DatabaseObject parameter. When
</maml:para><maml:para>the -Database parameter is specified, the -Path, -InputObject, or -ServerInstance parameter must also be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>The location and the file name of the backup. This is an optional parameter. If not specified, the backups are stored in the default backup location of the server under the name "databasename.bak" for full and file backups, or "databasename.trn" for log backups. This parameter cannot be used with the BackupDevice, or the BackupContainer parameter.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>The type of backup operation to be performed. Valid options are: Database, Files, or Log, as follows:
</maml:para><maml:para>Database: Backs up all the data files in the database.
</maml:para><maml:para>Files: Backs up specified data files. This requires the DatabaseFile or DatabaseFileGroup parameter to be set.
</maml:para><maml:para>Log: Backs up the transaction log.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>The folder or location where the backups are stored. This can be a folder on a disk or URL for a Windows Azure Blob container. This parameter can be useful when backing up multiple databases in a given instance. This parameter cannot be used with a BackupDevice parameter. The BackupContainer parameter cannot be used with the BackupFile parameter.
</maml:para><maml:para>Note: The path used to specify the location should end with a forward slash (/).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>The devices where the backups are stored. This parameter cannot be used with the BackupFile parameter. Use this parameter if you are backing up to tape.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>The optional description of the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>The name of the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>The physical block size for the backup, in bytes. The supported sizes are 512, 1024, 2048, 4096, 8192, 16384, 32768, and 65536 (64 KB) bytes. The default is 65536 for tape devices and 512 otherwise.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>The total number of I/O buffers to be used for the backup operation. You can specify any positive integer. Using many buffers might cause "out of memory" errors because of insufficient virtual address space in the Sqlservr.exe process.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>Calculates a checksum value during the backup operation. If not set, no checksum is calculated.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>The compression options for the backup operation. The options are Default, On, and Off.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>The operation continues when a checksum error occurs. If not set, the operation will fail after a checksum error.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>The backup is a copy-only backup. A copy-only backup does not affect the normal sequence of your regularly scheduled, conventional backups.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>One or more database files to be backed up. Only used  when the BackupAction property is set to Files. When the BackupAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>The database file groups targeted by the backup operation. Only used  when the BackupAction property is set to Files. When the BackupAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>The encryption options for the backup operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>The date and time when the backup set expires and the backup data is no longer considered valid. Can only be used for backup data stored on disk or tape devices. Backup sets older than the expiration date can be overwritten by a later backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>Formats the tape as the first step of the backup operation. Does not apply to a disk backup.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>Performs a differential backup.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>Devices associated with the backup operation are initialized. Overwrites any existing backup sets on the media and this backup becomes the first backup set on the media.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>The truncation behavior for log backups. Options are TruncateOnly, NoTruncate, or Truncate. By default, this option is set to Truncate.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>The maximum number of bytes to be transferred between the backup media and the instance of SQL Server. The possible values are multiples of 65536 bytes (64 KB), up to 4194304 bytes (4 MB).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>The optional description for the medium that contains the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>The name used to identify the media set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>Specifies an array of BackupDeviceList objects used by the mirrored backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>Does not back up the tail end of the log. When restored, the database is in the restoring state. When not set, the tail end of the log is backed up. Only applies when the -BackupAction parameter is set to Log.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>Leaves a tape drive open at the ending position when the backup completes. When not set, the tape is rewound after the operation completes. Does not apply to disk or URL backups.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>When set, outputs the Smo Backup object that performed the backup.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>Continues processing a partially completed backup operation. If not set (default), the cmdlet restarts an interrupted backup operation at the beginning of the backup set.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>The number of days that must elapse before a backup set can be overwritten. Can only be used for backup data stored on disk or tape devices.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>Skips reading the tape header.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server Credential object stores authentication information. This is a required parameter when backing up to Windows Azure Blob storage service (URL). The authentication information stored includes Windows Azure storage account name and the associated access key values. This parameter is not used with Disk or Tape. You can either provide the name of the SQL Server credential or pass the object through a pipeline.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>The name of the undo file used to store uncommitted transactions that are rolled back during recovery.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>The tape device is rewound and unloaded when the operation finishes. If not set, no attempt is made to rewind and unload the tape medium. Does not apply to disk or URL backups.
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object of the location where the backup should occur.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Backup-SqlDatabase</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>The location and the file name of the backup. This is an optional parameter. If not specified, the backups are stored in the default backup location of the server under the name "databasename.bak" for full and file backups, or "databasename.trn" for log backups. This parameter cannot be used with the BackupDevice, or the BackupContainer parameter.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>The type of backup operation to be performed. Valid options are: Database, Files, or Log, as follows:
</maml:para><maml:para>Database: Backs up all the data files in the database.
</maml:para><maml:para>Files: Backs up specified data files. This requires the DatabaseFile or DatabaseFileGroup parameter to be set.
</maml:para><maml:para>Log: Backs up the transaction log.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>The folder or location where the backups are stored. This can be a folder on a disk or URL for a Windows Azure Blob container. This parameter can be useful when backing up multiple databases in a given instance. This parameter cannot be used with a BackupDevice parameter. The BackupContainer parameter cannot be used with the BackupFile parameter.
</maml:para><maml:para>Note: The path used to specify the location should end with a forward slash (/).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>The devices where the backups are stored. This parameter cannot be used with the BackupFile parameter. Use this parameter if you are backing up to tape.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>The optional description of the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>The name of the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>The physical block size for the backup, in bytes. The supported sizes are 512, 1024, 2048, 4096, 8192, 16384, 32768, and 65536 (64 KB) bytes. The default is 65536 for tape devices and 512 otherwise.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>The total number of I/O buffers to be used for the backup operation. You can specify any positive integer. Using many buffers might cause "out of memory" errors because of insufficient virtual address space in the Sqlservr.exe process.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>Calculates a checksum value during the backup operation. If not set, no checksum is calculated.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>The compression options for the backup operation. The options are Default, On, and Off.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>The operation continues when a checksum error occurs. If not set, the operation will fail after a checksum error.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>The backup is a copy-only backup. A copy-only backup does not affect the normal sequence of your regularly scheduled, conventional backups.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>One or more database files to be backed up. Only used  when the BackupAction property is set to Files. When the BackupAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>The database file groups targeted by the backup operation. Only used  when the BackupAction property is set to Files. When the BackupAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>The encryption options for the backup operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>The date and time when the backup set expires and the backup data is no longer considered valid. Can only be used for backup data stored on disk or tape devices. Backup sets older than the expiration date can be overwritten by a later backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>Formats the tape as the first step of the backup operation. Does not apply to a disk backup.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>Performs a differential backup.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>Devices associated with the backup operation are initialized. Overwrites any existing backup sets on the media and this backup becomes the first backup set on the media.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>The truncation behavior for log backups. Options are TruncateOnly, NoTruncate, or Truncate. By default, this option is set to Truncate.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>The maximum number of bytes to be transferred between the backup media and the instance of SQL Server. The possible values are multiples of 65536 bytes (64 KB), up to 4194304 bytes (4 MB).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>The optional description for the medium that contains the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>The name used to identify the media set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>Specifies an array of BackupDeviceList objects used by the mirrored backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>Does not back up the tail end of the log. When restored, the database is in the restoring state. When not set, the tail end of the log is backed up. Only applies when the -BackupAction parameter is set to Log.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>Leaves a tape drive open at the ending position when the backup completes. When not set, the tape is rewound after the operation completes. Does not apply to disk or URL backups.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>When set, outputs the Smo Backup object that performed the backup.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>Continues processing a partially completed backup operation. If not set (default), the cmdlet restarts an interrupted backup operation at the beginning of the backup set.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>The number of days that must elapse before a backup set can be overwritten. Can only be used for backup data stored on disk or tape devices.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>Skips reading the tape header.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server Credential object stores authentication information. This is a required parameter when backing up to Windows Azure Blob storage service (URL). The authentication information stored includes Windows Azure storage account name and the associated access key values. This parameter is not used with Disk or Tape. You can either provide the name of the SQL Server credential or pass the object through a pipeline.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>The name of the undo file used to store uncommitted transactions that are rolled back during recovery.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>The tape device is rewound and unloaded when the operation finishes. If not set, no attempt is made to rewind and unload the tape medium. Does not apply to disk or URL backups.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupAction</maml:name><maml:description><maml:para>The type of backup operation to be performed. Valid options are: Database, Files, or Log, as follows:
</maml:para><maml:para>Database: Backs up all the data files in the database.
</maml:para><maml:para>Files: Backs up specified data files. This requires the DatabaseFile or DatabaseFileGroup parameter to be set.
</maml:para><maml:para>Log: Backs up the transaction log.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupActionType</command:parameterValue><dev:type><maml:name>BackupActionType</maml:name><maml:uri /></dev:type><dev:defaultValue>Microsoft.SqlServer.Management.Smo.BackupActionType.Database</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupContainer</maml:name><maml:description><maml:para>The folder or location where the backups are stored. This can be a folder on a disk or URL for a Windows Azure Blob container. This parameter can be useful when backing up multiple databases in a given instance. This parameter cannot be used with a BackupDevice parameter. The BackupContainer parameter cannot be used with the BackupFile parameter.
</maml:para><maml:para>Note: The path used to specify the location should end with a forward slash (/).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>The devices where the backups are stored. This parameter cannot be used with the BackupFile parameter. Use this parameter if you are backing up to tape.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue><dev:type><maml:name>BackupDeviceItem[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>The location and the file name of the backup. This is an optional parameter. If not specified, the backups are stored in the default backup location of the server under the name "databasename.bak" for full and file backups, or "databasename.trn" for log backups. This parameter cannot be used with the BackupDevice, or the BackupContainer parameter.
</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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetDescription</maml:name><maml:description><maml:para>The optional description of the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupSetName</maml:name><maml:description><maml:para>The name of the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>The physical block size for the backup, in bytes. The supported sizes are 512, 1024, 2048, 4096, 8192, 16384, 32768, and 65536 (64 KB) bytes. The default is 65536 for tape devices and 512 otherwise.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>The total number of I/O buffers to be used for the backup operation. You can specify any positive integer. Using many buffers might cause "out of memory" errors because of insufficient virtual address space in the Sqlservr.exe process.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>Calculates a checksum value during the backup operation. If not set, no checksum is calculated.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CompressionOption</maml:name><maml:description><maml:para>The compression options for the backup operation. The options are Default, On, and Off.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupCompressionOptions</command:parameterValue><dev:type><maml:name>BackupCompressionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue>Microsoft.SqlServer.Management.Smo.BackupCompressionOptions.Default</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>The number of seconds to wait for a server connection before a time-out failure. The time-out value must be an integer between 0 and 65534. If 0 is specified, connection attempts do not time out.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>The operation continues when a checksum error occurs. If not set, the operation will fail after a checksum error.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>CopyOnly</maml:name><maml:description><maml:para>The backup is a copy-only backup. A copy-only backup does not affect the normal sequence of your regularly scheduled, conventional backups.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>A PSCredential object used to specify the credentials for a SQL Server login that has permission to perform this operation.

This is not the SQL Credential object that is used to store authentication information which is used internally by SQL Server when accessing resources outside SQL Server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>The name of the database to be backed up. -Database cannot be used with the -DatabaseObject parameter. When
</maml:para><maml:para>the -Database parameter is specified, the -Path, -InputObject, or -ServerInstance parameter must also be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>One or more database files to be backed up. Only used  when the BackupAction property is set to Files. When the BackupAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</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" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>The database file groups targeted by the backup operation. Only used  when the BackupAction property is set to Files. When the BackupAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</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" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>DatabaseObject</maml:name><maml:description><maml:para>A database object. The backup operation will be performed on this database.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Database</command:parameterValue><dev:type><maml:name>Database</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>The encryption options for the backup operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue><dev:type><maml:name>BackupEncryptionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ExpirationDate</maml:name><maml:description><maml:para>The date and time when the backup set expires and the backup data is no longer considered valid. Can only be used for backup data stored on disk or tape devices. Backup sets older than the expiration date can be overwritten by a later backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">DateTime</command:parameterValue><dev:type><maml:name>DateTime</maml:name><maml:uri /></dev:type><dev:defaultValue>System.DateTime.MinValue</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FormatMedia</maml:name><maml:description><maml:para>Formats the tape as the first step of the backup operation. Does not apply to a disk backup.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Incremental</maml:name><maml:description><maml:para>Performs a differential backup.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Initialize</maml:name><maml:description><maml:para>Devices associated with the backup operation are initialized. Overwrites any existing backup sets on the media and this backup becomes the first backup set on the media.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object of the location where the backup should occur.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>LogTruncationType</maml:name><maml:description><maml:para>The truncation behavior for log backups. Options are TruncateOnly, NoTruncate, or Truncate. By default, this option is set to Truncate.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupTruncateLogType</command:parameterValue><dev:type><maml:name>BackupTruncateLogType</maml:name><maml:uri /></dev:type><dev:defaultValue>Microsoft.SqlServer.Management.Smo.BackupTruncateLogType.Truncate</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>The maximum number of bytes to be transferred between the backup media and the instance of SQL Server. The possible values are multiples of 65536 bytes (64 KB), up to 4194304 bytes (4 MB).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaDescription</maml:name><maml:description><maml:para>The optional description for the medium that contains the backup set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>The name used to identify the media set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MirrorDevices</maml:name><maml:description><maml:para>Specifies an array of BackupDeviceList objects used by the mirrored backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceList[]</command:parameterValue><dev:type><maml:name>BackupDeviceList[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>Does not back up the tail end of the log. When restored, the database is in the restoring state. When not set, the tail end of the log is backed up. Only applies when the -BackupAction parameter is set to Log.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>Leaves a tape drive open at the ending position when the backup completes. When not set, the tape is rewound after the operation completes. Does not apply to disk or URL backups.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>When set, outputs the Smo Backup object that performed the backup.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server on which you want to execute the backup operation. This is an optional parameter. If not specified, the value of this parameter defaults to the current working 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>Continues processing a partially completed backup operation. If not set (default), the cmdlet restarts an interrupted backup operation at the beginning of the backup set.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetainDays</maml:name><maml:description><maml:para>The number of days that must elapse before a backup set can be overwritten. Can only be used for backup data stored on disk or tape devices.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue>-1</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>The name of an instance of SQL Server. This server instance becomes the target of the backup operation.
</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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SkipTapeHeader</maml:name><maml:description><maml:para>Skips reading the tape header.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server Credential object stores authentication information. This is a required parameter when backing up to Windows Azure Blob storage service (URL). The authentication information stored includes Windows Azure storage account name and the associated access key values. This parameter is not used with Disk or Tape. You can either provide the name of the SQL Server credential or pass the object through a pipeline.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UndoFileName</maml:name><maml:description><maml:para>The name of the undo file used to store uncommitted transactions that are rolled back during recovery.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>The tape device is rewound and unloaded when the operation finishes. If not set, no attempt is made to rewind and unload the tape medium. Does not apply to disk or URL backups.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>SMO.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>

A SMO.Server object referring to the instance of SQL Server on which the backup operation should occur.


</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>  
-------------------------- EXAMPLE 1 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates a complete database backup of the database 'MyDB' to the default backup location of the server instance Computer\Instance'. The backup file will be named 'MyDB.bak'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 2 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;cd SQLSERVER:\SQL\Computer\Instance
Backup-SqlDatabase -Database MyDB


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates a complete database backup of the database 'MyDB' to the default backup location of the server instance 'Computer\Instance'. The current working directory is used to determine the server instance where the backup should occur.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 3 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupAction Log


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates a backup of the transaction log of the database 'MyDB' to the default backup location of the server instance 'Computer\Instance'. The backup file is named 'MyDB.trn'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 4 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -Credential (Get-Credential sa)


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates a complete database backup of the database 'MyDB', using the sa SQL Server Login. This command prompts you for a password to complete SQL Server authentication.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 5 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile \\share\folder\MyDB.bak


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates a complete database backup of the database 'MyDB' to the file '\\share\folder\MyDB.bak'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 6 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\SQL\Computer\Instance\Databases | Backup-SqlDatabase


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command backs up all databases on the server instance 'Computer\Instance' to the default backup location. The backup files are named '&lt;database name&gt;.bak'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 7 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;cd SQLSERVER:\SQL\Computer\Instance\Databases
foreach($database in (Get-ChildItem))
{
$dbName = $database.Name
Backup-SqlDatabase -Database $dbName -BackupFile "\\share\folder\$dbName.bak"
}


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This script creates a full backup for each database on the server instance 'Computer\Instance' to the share '\\share\folder'. The backup files are named '&lt;database name&gt;.bak'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 8 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupAction Files -DatabaseFileGroup "FileGroup1","FileGroup2"


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates a full file backup of every file in the secondary filegroups 'FileGroup1' and 'FileGroup2'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 9 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -Incremental


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates a differential backup of the database 'MyDB' to the default backup location of the server instance 'Computer\Instance'. The backup file is named 'MyDB.bak'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 10 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$tapeDevice = New-Object Microsoft.Sqlserver.Management.Smo.BackupDeviceItem("\\.\tape0", "Tape")
Backup-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupDevice $tapeDevice


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates a full backup of the database 'MyDB' to the tape device '\\.\tape0'. To represent this device, the command constructs an instance of the Microsoft.Sqlserver.Management.Smo.BackupDeviceItem. The constructor takes two arguments: the name of the backup device ('\\.\tape0') and the type of the backup device ('Tape'). This BackupDeviceItem object is passed to the -BackupDevice parameter of the Backup-SqlDatabase cmdlet.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>                        
-------------------------- EXAMPLE 11 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;Backup-SqlDatabase –ServerInstance Computer\Instance –Database –MyDB -BackupContainer "https://storageaccountname.blob.core.windows.net/containername" -SqlCredential "SQLCredentialName"

</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates a full backup of the database 'MyDB' to the Windows Azure Blob storage service. It uses the BackupContainer to specify the location (URL) of the Windows Azure Blob container, and the name of the backup file is auto generated. The SqlCredential parameter is used to specify the name of the SQL Server credential that stores the authentication information.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>                        
-------------------------- EXAMPLE 12 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;Backup-SqlDatabase –ServerInstance Computer\Instance –Database –MyDB -BackupFile "https://storageaccountname.blob.core.windows.net/containername/MyDB.bak" -SqlCredential "SQLCredentialName"

</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates a full backup of the database 'MyDB' to the Windows Azure Blob storage service. It uses the BackupFile parameter to specify the location (URL) and the backup file name. The SqlCredential parameter is used to specify the name of the SQL Server credential.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 13 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\SQL\Computer\Instance\Databases | Backup-SqlDatabase –BackupContainer "https://storageaccountname.blob.core.windows.net/containername" -SqlCredential "SQLCredentialName"


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command backs up all databases on the server instance 'Computer\Instance' to the Windows Azure Blob storage service location by using the BackupContainer parameter. The backup file names are auto generated.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 14 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$encryptionOption = New-SqlBackupEncryptionOption -Algorithm Aes256 -EncryptorType ServerCertificate -EncryptorName "BackupCert"
</dev:code><dev:code>C:\PS&gt;Backup-SqlDatabase -ServerInstance . -Database "db1" -BackupFile "db1.bak" -CompressionOption On -EncryptionOption $encryptionOption

</dev:code><dev:remarks><maml:para>This example creates the encryption options and uses it as a parameter value in Backup-SqlDatabase to create an encrypted backup.</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Disable-SqlAlwaysOn</command:name><maml:description><maml:para>Disables the AlwaysOn Availability Groups feature on the instance of SQL Server specified by the Path, InputObject, or ServerInstance parameter. </maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Disable</command:verb><command:noun>SqlAlwaysOn</command:noun><dev:version /></command:details><maml:description><maml:para>The Disable-SqlAlwaysOn cmdlet disables the AlwaysOn Availability Groups feature on an instance of SQL Server. If AlwaysOn Availability Groups is disabled while the SQL Server service is running, the Database Engine service must be restarted for the changes to complete.  Unless you specify the -Force parameter, the cmdlet prompts you to ask whether you wish to restart the service; if cancelled, no operation occurs.
</maml:para><maml:para>If AlwaysOn Availability Groups is already disabled, this cmdlet does nothing.
</maml:para><maml:para>This cmdlet can run against a remote service. You must have Administrator permissions to execute this cmdlet.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Disable-SqlAlwaysOn</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>A windows credential that has permission to alter the AlwaysOn setting on the specified instance of SQL Server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>Specify -Force to compel the cmdlet to continue without any confirmation from to the user. This parameter is provided to permit the construction of scripts.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>The user is not prompted to restart the SQL Server service. You must manually restart the SQL Server service for changes to take effect. When this parameter is set, -Force is ignored.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Disable-SqlAlwaysOn</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object of the instance of SQL Server where the AlwaysOn Availability Groups setting should be disabled.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>A windows credential that has permission to alter the AlwaysOn setting on the specified instance of SQL Server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>Specify -Force to compel the cmdlet to continue without any confirmation from to the user. This parameter is provided to permit the construction of scripts.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>The user is not prompted to restart the SQL Server service. You must manually restart the SQL Server service for changes to take effect. When this parameter is set, -Force is ignored.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Disable-SqlAlwaysOn</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>A windows credential that has permission to alter the AlwaysOn setting on the specified instance of SQL Server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>Specify -Force to compel the cmdlet to continue without any confirmation from to the user. This parameter is provided to permit the construction of scripts.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>The user is not prompted to restart the SQL Server service. You must manually restart the SQL Server service for changes to take effect. When this parameter is set, -Force is ignored.
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>The name of the instance of SQL Server where AlwaysOn is to be disabled. The format should be MACHINENAME\INSTANCE. Can be used with the -Credential parameter to change the AlwaysOn setting on a remote server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>A windows credential that has permission to alter the AlwaysOn setting on the specified instance of SQL Server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>Specify -Force to compel the cmdlet to continue without any confirmation from to the user. This parameter is provided to permit the construction of scripts.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object of the instance of SQL Server where the AlwaysOn Availability Groups setting should be disabled.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue><dev:type><maml:name>Server</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>The user is not prompted to restart the SQL Server service. You must manually restart the SQL Server service for changes to take effect. When this parameter is set, -Force is ignored.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>False</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>The name of the instance of SQL Server where AlwaysOn is to be disabled. The format should be MACHINENAME\INSTANCE. Can be used with the -Credential parameter to change the AlwaysOn setting on a remote server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>SMO.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>

A SMO.Server object referring the instance of SQL Server on which AlwaysOn should be disabled.


</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>False</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> 
 
-------------------------- EXAMPLE 1 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Disable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command disables AlwaysOn Availability Groups on the instance of SQL Server located at the specified path. This command requires restarting the server instance, and you will be prompted to confirm this restart.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 2 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Disable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance -Force


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command disables AlwaysOn Availability Groups on the instance of SQL Server located at the specified path. The -Force option causes the server instance to be restarted without prompting you for confirmation.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 3 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Disable-SqlAlwaysOn -ServerInstance Computer\Instance


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command disables AlwaysOn Availability Groups on the instance of SQL Server named 'Computer\Instance'. This command requires restarting the instance, and you will be prompted to confirm this restart.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 4 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Disable-SqlAlwaysOn -ServerInstance Computer\Instance -Credential (Get-Credential DOMAIN\Username)


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command disables AlwaysOn Availability Groups on the instance of SQL Server named 'Computer\Instance' using Windows authentication. You will be prompted to enter the password for the specified account, 'DOMAIN\Username'. This change requires restarting the instance, and you will also be prompted to confirm this restart.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 5 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Disable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance -NoServiceRestart


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command disables AlwaysOn Availability Groups on the instance of SQL Server located at the specified path, but the command does not restart the instance. The change will not take effect until you manually restart this server instance.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Enable-SqlAlwaysOn</command:name><maml:description><maml:para>Enables the AlwaysOn Availability Groups feature on the instance of SQL Server specified by the Path, InputObject, or ServerInstance parameter. </maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Enable</command:verb><command:noun>SqlAlwaysOn</command:noun><dev:version /></command:details><maml:description><maml:para>The Enable-SqlAlwaysOn cmdlet enables AlwaysOn on an instance of SQL Server. If AlwaysOn Availability Groups is enabled while the SQL Server service is running, the Database Engine service must be restarted for the changes to complete. Unless you specify the -Force parameter, the cmdlet prompts you to ask whether you wish to restart the service; if cancelled, no operation occurs.
</maml:para><maml:para>If AlwaysOn Availability Groups is already enabled, this cmdlet does nothing.
</maml:para><maml:para>This cmdlet can run against a remote service. You must have Administrator permissions to execute this cmdlet.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Enable-SqlAlwaysOn</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>The name of the instance of SQL Server on which you want to enable AlwaysOn. The format should be MACHINENAME\INSTANCE. Can be used in conjunction with the -Credential parameter to change the AlwaysOn setting on a remote server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>Specify -Force to compel the cmdlet to continue without any confirmation from to the user. This parameter is provided to permit the construction of scripts.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>The user is not prompted to restart the SQL Server service. You must manually restart the SQL Server service for changes to take effect. When this parameter is set, -Force is ignored.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Enable-SqlAlwaysOn</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object of the instance of SQL Server where the AlwaysOn Availability Groups setting should be enabled.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>The name of the instance of SQL Server on which you want to enable AlwaysOn. The format should be MACHINENAME\INSTANCE. Can be used in conjunction with the -Credential parameter to change the AlwaysOn setting on a remote server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>Specify -Force to compel the cmdlet to continue without any confirmation from to the user. This parameter is provided to permit the construction of scripts.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>The user is not prompted to restart the SQL Server service. You must manually restart the SQL Server service for changes to take effect. When this parameter is set, -Force is ignored.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Enable-SqlAlwaysOn</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>The name of the instance of SQL Server on which you want to enable AlwaysOn. The format should be MACHINENAME\INSTANCE. Can be used in conjunction with the -Credential parameter to change the AlwaysOn setting on a remote server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>Specify -Force to compel the cmdlet to continue without any confirmation from to the user. This parameter is provided to permit the construction of scripts.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>The user is not prompted to restart the SQL Server service. You must manually restart the SQL Server service for changes to take effect. When this parameter is set, -Force is ignored.
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>The name of the instance of SQL Server where AlwaysOn is to be enabled. The format should be MACHINENAME\INSTANCE. Can be used with the -Credential parameter to change the AlwaysOn setting on a remote server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>The name of the instance of SQL Server on which you want to enable AlwaysOn. The format should be MACHINENAME\INSTANCE. Can be used in conjunction with the -Credential parameter to change the AlwaysOn setting on a remote server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>Specify -Force to compel the cmdlet to continue without any confirmation from to the user. This parameter is provided to permit the construction of scripts.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object of the instance of SQL Server where the AlwaysOn Availability Groups setting should be enabled.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue><dev:type><maml:name>Server</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>The user is not prompted to restart the SQL Server service. You must manually restart the SQL Server service for changes to take effect. When this parameter is set, -Force is ignored.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>False</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>The name of the instance of SQL Server where AlwaysOn is to be enabled. The format should be MACHINENAME\INSTANCE. Can be used with the -Credential parameter to change the AlwaysOn setting on a remote server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>

A SMO.Server object referring to the instance of SQL Server on which AlwaysOn should be enabled.


</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> 
 
-------------------------- EXAMPLE 1 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Enable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command enables AlwaysOn Availability Groups on the instance of SQL Server located at the specified path. This change requires restarting the instance, and you will be prompted to confirm this restart.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 2 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Enable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance -Force


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command enables AlwaysOn Availability Groups on the instance of SQL Server located at the specified path. The -Force option causes the server instance to be restarted without prompting you for confirmation.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 3 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Enable-SqlAlwaysOn -ServerInstance Computer\Instance


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command enables AlwaysOn Availability Groups on the instance of SQL Server named 'Computer\Instance'. This change requires restarting the instance, and you will be prompted to confirm this restart.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 4 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Enable-SqlAlwaysOn -ServerInstance Computer\Instance -Credential (Get-Credential DOMAIN\Username)


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command enables AlwaysOn Availability Groups on the instance of SQL Server named 'Computer\Instance' using Windows authentication. You will be prompted to enter the password for the specified account. This change requires restarting the instance, and you will also be prompted to confirm this restart.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 5 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Enable-SqlAlwaysOn -Path SQLSERVER:\Sql\Computer\Instance -NoServiceRestart


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command enables AlwaysOn Availability Groups on the instance of SQL Server located at the specified path, but the command does not restart the instance. The change will not take effect until you manually restart this server instance.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Get-SqlCredential</command:name><maml:description><maml:para>Returns SQL credential object.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Get</command:verb><command:noun>SqlCredential</command:noun><dev:version /></command:details><maml:description><maml:para>The Get-SqlCredential returns the SQL credential object.
</maml:para><maml:para>This cmdlet supports the following modes of operation to return the name of the SQL credential:

1. By specifying the name of the SQL credential and the path of the instance

2. By specifying the name of the SQL Credential and the server object.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>Name of the credential
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path of the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter uses the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>Name of the credential
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object where the credential is located.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object where the credential is located.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>Name of the credential
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path of the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter uses the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>

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


                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-SqlCredential –Name "mycredential"


</dev:code><dev:remarks><maml:para>This command returns the credential object.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;
</dev:code><dev:remarks></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Get-SqlDatabase</command:name><maml:description><maml:para>Returns a SQL Database object for each database that is present in the target instance of SQL Server.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Get</command:verb><command:noun>SqlDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>Returns a SQL Database object for each database that is present in the target instance of SQL Server. If the name of the database is provided, the cmdlet will return only this specific database object. </maml:para><maml:para>This cmdlet supports the following modes of operation to return the SQL Database object:</maml:para><maml:para>1. By specifying the instance PowerShell path.</maml:para><maml:para>2. By specifying the server object.</maml:para><maml:para>3. By specifying the ServerInstance of the target instance of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-SqlDatabase</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the database to be retrieved.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Generates a Transact-SQL script that performs the task executed by this cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-SqlDatabase</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the database to be retrieved.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="3" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>This parameter specifies the name of an instance of SQL Server that becomes the target of the operation.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>The number of seconds to wait for a SQL Server connection before a timeout failure. The timeout value must be an integer between 0 and 65534. If 0 is specified, connection attempts do not time out.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Generates a Transact-SQL script that performs the task executed by this cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-SqlDatabase</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the database to be retrieved.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The server object of the target instance.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Generates a Transact-SQL script that performs the task executed by this cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>The number of seconds to wait for a SQL Server connection before a timeout failure. The timeout value must be an integer between 0 and 65534. If 0 is specified, connection attempts do not time out.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The server object of the target instance.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the database to be retrieved.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Generates a Transact-SQL script that performs the task executed by this cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="3" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>This parameter specifies the name of an instance of SQL Server that becomes the target of the operation.</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" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;CD SQLSERVER:\SQL\Computer\Instance;
Get-SqlDatabase -Name "DbName" -Credential $sqlCredential;

</dev:code><dev:remarks><maml:para>This command returns the database object for the database ‘DbName’ of the server instance 'Computer\Instance’. The current working directory is used to determine the server instance where the operation should occur.</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and returns all the databases that are present in the instances.
PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName " MachineName" | Get-SqlDatabase -Credential $sqlCredential;

</dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Get-SqlInstance</command:name><maml:description><maml:para>Returns a SQL Instance object for each instance of SQL Server that is present on the target machine.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Get</command:verb><command:noun>SqlInstance</command:noun><dev:version /></command:details><maml:description><maml:para>Returns a SQL Instance object for each instance of SQL Server that is present on the target machine. If the name of the instance of SQL Server is provided, the cmdlet will only return this specific instance of SQL Server.</maml:para><maml:para>SQL Server Cloud Adapter must be running and accessible on the computer that hosts the instance of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-SqlInstance</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>MachineName</maml:name><maml:description><maml:para>The name of the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the instance of SQL Server, when you want to retrieve a specific instance of SQL Server on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>MachineName</maml:name><maml:description><maml:para>The name of the target machine.</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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the instance of SQL Server, when you want to retrieve a specific instance of SQL Server on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName " MachineName" -Name "InstanceName" -AcceptSelfSignedCertificate;

</dev:code><dev:remarks><maml:para>This command retrieves the SQL Server instance ‘InstanceName’ on the machine ‘MachineName’. The self-signed certificate of the target machine will be automatically accepted without prompting the user.</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’. The self-signed certificate of the target machine will be automatically accepted without prompting the user.
PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName "MachineName" -AcceptSelfSignedCertificate;

</dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Get-SqlSmartAdmin</command:name><maml:description><maml:para>Gets or retrieves the SQL Smart Admin object and its properties. </maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Get</command:verb><command:noun>SqlSmartAdmin</command:noun><dev:version /></command:details><maml:description><maml:para>The Get-SqlSmartAdmin cmdlet gets the SQL Smart Admin object. The Smart Admin object includes SQL Server Managed Backup to Windows Azure configuration settings. This cmdlet supports the following modes of operation to return the object: 

 1Pass the name of the server instance using the –name parameter. For a default instance, specify only the computer name. For a named instance, use ’computername\instancename’  

 2. Pass the path of the instance of SQL Server to the -Path parameter.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Get-SqlSmartAdmin</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server. This is an optional parameter. If not specified, the value of this parameter is set to the current working location.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>Name of the instance of the SQL Server in this format: ‘Computer\Instance’</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>The name of an instance of the SQL Server. For default instances, only specify the computer name: "MyComputer". For named instances, use the format "ComputerName\InstanceName". Both the –name parameter and the –ServerInstance allow for specifying the name of the instance, but the –ServerInstance, also accepts pipeline input of the Server instance name, or the SqInstanceInfo object. The SqlInstanceInfo object can be retrieved using the Get-SqlIstances cmdlet.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-SqlSmartAdmin</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>Instance of the Server object</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>Name of the instance of the SQL Server in this format: ‘Computer\Instance’</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>The name of an instance of the SQL Server. For default instances, only specify the computer name: "MyComputer". For named instances, use the format "ComputerName\InstanceName". Both the –name parameter and the –ServerInstance allow for specifying the name of the instance, but the –ServerInstance, also accepts pipeline input of the Server instance name, or the SqInstanceInfo object. The SqlInstanceInfo object can be retrieved using the Get-SqlIstances cmdlet.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Get-SqlSmartAdmin</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>Name of the instance of the SQL Server in this format: ‘Computer\Instance’</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>The name of an instance of the SQL Server. For default instances, only specify the computer name: "MyComputer". For named instances, use the format "ComputerName\InstanceName". Both the –name parameter and the –ServerInstance allow for specifying the name of the instance, but the –ServerInstance, also accepts pipeline input of the Server instance name, or the SqInstanceInfo object. The SqlInstanceInfo object can be retrieved using the Get-SqlIstances cmdlet.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>Instance of the Server object</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>Name of the instance of the SQL Server in this format: ‘Computer\Instance’</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server. This is an optional parameter. If not specified, the value of this parameter is set to the current working location.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>The name of an instance of the SQL Server. For default instances, only specify the computer name: "MyComputer". For named instances, use the format "ComputerName\InstanceName". Both the –name parameter and the –ServerInstance allow for specifying the name of the instance, but the –ServerInstance, also accepts pipeline input of the Server instance name, or the SqInstanceInfo object. The SqlInstanceInfo object can be retrieved using the Get-SqlIstances cmdlet.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>  
-------------------------- EXAMPLE 1 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\ PS&gt; cd SQLSERVER:\SQL\Computer\MyInstance 
 Get-SqlSmartAdmin
Following is a list of the properties returned by the above command :
BackupEnabled : Shows whether backup is enabled at the instance level. 
BackupRetentionPeriodInDays:   Displays the number of days for retaining backup files. 
CredentialName: Name of the SQL Credential used to authenticate to the Windows Azure storage account. 
MasterSwitch: Shows whether the master switch is turned on or off. 
Parent: Name of the instance of SQL Server. 
Urn: The path of the Smart Admin object. 
Properties: list of all the properties including the above.
</dev:code><dev:remarks><maml:para>This command retrieves the smart admin object properties for the named SQL Server instance, ‘MyInstance’</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 2 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;Get-SqlSmartAdmin -name “computer\MyInstance”
</dev:code><dev:remarks><maml:para>This command retrieves the smart admin object properties using the -serverName parameter.</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Invoke-PolicyEvaluation</command:name><maml:description><maml:para>Evaluates one or more SQL Server Policy-Based Management policies against a target set, either reporting the compliance level of the set, or bringing the set into compliance.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Invoke</command:verb><command:noun>PolicyEvaluation</command:noun><dev:version /></command:details><maml:description><maml:para>Evaluates one or more Policy-Based Management policies against a set of SQL Server objects named the target set. The policies specify the allowed values for various properties that are associated with SQL Server objects, such as establishing site standards for database names or collations. When Invoke-PolicyEvaluation runs in check mode, it reports whether the current properties of the objects in the target set comply with the rules in the policy definitions. The objects in the target set are not reconfigured if their properties do not comply with the policies. In configure mode, Invoke-PolicyEvaluation reconfigures any objects in the target set that do not comply with the policy definitions.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-PolicyEvaluation</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="1" aliases=""><maml:name>Policy</maml:name><maml:description><maml:para>Specifies one or more policies to be evaluated. Policies can be stored in an instance of the SQL Server Database Engine, or as exported XML files. For policies that are stored in an instance of the Database Engine, use a path that is based on the SQLSERVER:\SQLPolicy folder to specify the location of the polices. For policies that are stored as XML files, use a file system path to specify the location the policies.
</maml:para><maml:para>-Policy can take a string that specifies the names of one or more policies to evaluate. If only a file or policy name is specified in the string, Invoke-PolicyEvaluation uses the setting of the current path. For policies that are stored in an instance of the Database Engine, use the policy name, such as "Database Status" or "SQLSERVER:\SQLPolicy\MyComputer\DEFAULT\Policies\Database Status". For policies that are exported as XML files, use the name of the file, such as "Database Status.xml" or  "C:\MyPolicyFolder\Database Status.xml".
</maml:para><maml:para>-Policy can take a set of FileInfo objects, such as the piped output of a Get-ChildItem cmdlet that is run against a folder that contains exported XML policies. -Policy can also take a set of Policy objects, such as the piped output of a Get-ChildItem run against a SQLSERVER:\SQLPolicy path.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AdHocPolicyEvaluationMode</maml:name><maml:description><maml:para>Specifies whether Invoke-PolicyEvaluation only reports on the compliance status of the target set (Check), or if it also reconfigures the target set to comply with the policies (Configure).
</maml:para><maml:para>Check - Report the compliance status of the target set by using the credentials of your login account, and without reconfiguring any objects.
</maml:para><maml:para>CheckSqlScriptAsProxy - Run a check report by using the ##MS_PolicyTSQLExecutionLogin## proxy account credentials.
</maml:para><maml:para>Configure - Reconfigure target set objects that do not comply with the policies, and report the resulting status. Invoke-PolicyEvaluation only reconfigures properties that are settable and deterministic.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AdHocPolicyEvaluationMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>OutputXml</maml:name><maml:description><maml:para>Specifies that the Invoke-PolicyEvaluation cmdlet produce its report in XML format using the Service Modeling Language Interchange Format (SML-IF) schema.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetExpression</maml:name><maml:description><maml:para>Specifies a query that returns the list of objects that defines the target set. The queries are specified as a string that has nodes which are separated by the '/' character. Each node is in the format ObjectType[Filter]. ObjectType is one of the objects in the SQL Server Management Objects (SMO) object model, and Filter is an expression that filters for specific objects at that node. The nodes must follow the hierarchy of the SMO objects.  For example, the following query expression returns the AdventureWorks sample database:  "Server[@Name='MyComputer']/Database[@Name='AdventureWorks']"
</maml:para><maml:para>If -TargetExpression is specified, do not specify -TargetObject.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetServerName</maml:name><maml:description><maml:para>Specifies the instance of the Database Engine that contains the target set. You can specify a variable that contains a Microsoft.SqlServer.Management.Sfc.Sdk.SQLStoreConnection object. You can also specify a string that complies with the formats that are used in the ConnectionString property of the System.Data.SqlClient.SQLConnection class. These include strings such as those created by using the System.Data.SqlClient.SqlConnectionStringBuilder class. By default, Invoke-PolicyEvaluation connects by using Windows Authentication.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Invoke-PolicyEvaluation</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="1" aliases=""><maml:name>Policy</maml:name><maml:description><maml:para>Specifies one or more policies to be evaluated. Policies can be stored in an instance of the SQL Server Database Engine, or as exported XML files. For policies that are stored in an instance of the Database Engine, use a path that is based on the SQLSERVER:\SQLPolicy folder to specify the location of the polices. For policies that are stored as XML files, use a file system path to specify the location the policies.
</maml:para><maml:para>-Policy can take a string that specifies the names of one or more policies to evaluate. If only a file or policy name is specified in the string, Invoke-PolicyEvaluation uses the setting of the current path. For policies that are stored in an instance of the Database Engine, use the policy name, such as "Database Status" or "SQLSERVER:\SQLPolicy\MyComputer\DEFAULT\Policies\Database Status". For policies that are exported as XML files, use the name of the file, such as "Database Status.xml" or  "C:\MyPolicyFolder\Database Status.xml".
</maml:para><maml:para>-Policy can take a set of FileInfo objects, such as the piped output of a Get-ChildItem cmdlet that is run against a folder that contains exported XML policies. -Policy can also take a set of Policy objects, such as the piped output of a Get-ChildItem run against a SQLSERVER:\SQLPolicy path.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AdHocPolicyEvaluationMode</maml:name><maml:description><maml:para>Specifies whether Invoke-PolicyEvaluation only reports on the compliance status of the target set (Check), or if it also reconfigures the target set to comply with the policies (Configure).
</maml:para><maml:para>Check - Report the compliance status of the target set by using the credentials of your login account, and without reconfiguring any objects.
</maml:para><maml:para>CheckSqlScriptAsProxy - Run a check report by using the ##MS_PolicyTSQLExecutionLogin## proxy account credentials.
</maml:para><maml:para>Configure - Reconfigure target set objects that do not comply with the policies, and report the resulting status. Invoke-PolicyEvaluation only reconfigures properties that are settable and deterministic.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AdHocPolicyEvaluationMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>OutputXml</maml:name><maml:description><maml:para>Specifies that the Invoke-PolicyEvaluation cmdlet produce its report in XML format using the Service Modeling Language Interchange Format (SML-IF) schema.
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetObjects</maml:name><maml:description><maml:para>Specifies a PSObject or an array of PSObjects that define the set of SQL Server objects against which the policy is evaluated. To connect to an instance of SQL Server Analysis Services, specify a Microsoft.AnalysisServices.Server object for -TargetObject.
</maml:para><maml:para>If -TargetObject is specified, do not specify -TargetExpression.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">PSObject[]</command:parameterValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AdHocPolicyEvaluationMode</maml:name><maml:description><maml:para>Specifies whether Invoke-PolicyEvaluation only reports on the compliance status of the target set (Check), or if it also reconfigures the target set to comply with the policies (Configure).
</maml:para><maml:para>Check - Report the compliance status of the target set by using the credentials of your login account, and without reconfiguring any objects.
</maml:para><maml:para>CheckSqlScriptAsProxy - Run a check report by using the ##MS_PolicyTSQLExecutionLogin## proxy account credentials.
</maml:para><maml:para>Configure - Reconfigure target set objects that do not comply with the policies, and report the resulting status. Invoke-PolicyEvaluation only reconfigures properties that are settable and deterministic.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AdHocPolicyEvaluationMode</command:parameterValue><dev:type><maml:name>AdHocPolicyEvaluationMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>OutputXml</maml:name><maml:description><maml:para>Specifies that the Invoke-PolicyEvaluation cmdlet produce its report in XML format using the Service Modeling Language Interchange Format (SML-IF) schema.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="1" aliases=""><maml:name>Policy</maml:name><maml:description><maml:para>Specifies one or more policies to be evaluated. Policies can be stored in an instance of the SQL Server Database Engine, or as exported XML files. For policies that are stored in an instance of the Database Engine, use a path that is based on the SQLSERVER:\SQLPolicy folder to specify the location of the polices. For policies that are stored as XML files, use a file system path to specify the location the policies.
</maml:para><maml:para>-Policy can take a string that specifies the names of one or more policies to evaluate. If only a file or policy name is specified in the string, Invoke-PolicyEvaluation uses the setting of the current path. For policies that are stored in an instance of the Database Engine, use the policy name, such as "Database Status" or "SQLSERVER:\SQLPolicy\MyComputer\DEFAULT\Policies\Database Status". For policies that are exported as XML files, use the name of the file, such as "Database Status.xml" or  "C:\MyPolicyFolder\Database Status.xml".
</maml:para><maml:para>-Policy can take a set of FileInfo objects, such as the piped output of a Get-ChildItem cmdlet that is run against a folder that contains exported XML policies. -Policy can also take a set of Policy objects, such as the piped output of a Get-ChildItem run against a SQLSERVER:\SQLPolicy path.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetExpression</maml:name><maml:description><maml:para>Specifies a query that returns the list of objects that defines the target set. The queries are specified as a string that has nodes which are separated by the '/' character. Each node is in the format ObjectType[Filter]. ObjectType is one of the objects in the SQL Server Management Objects (SMO) object model, and Filter is an expression that filters for specific objects at that node. The nodes must follow the hierarchy of the SMO objects.  For example, the following query expression returns the AdventureWorks sample database:  "Server[@Name='MyComputer']/Database[@Name='AdventureWorks']"
</maml:para><maml:para>If -TargetExpression is specified, do not specify -TargetObject.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetObjects</maml:name><maml:description><maml:para>Specifies a PSObject or an array of PSObjects that define the set of SQL Server objects against which the policy is evaluated. To connect to an instance of SQL Server Analysis Services, specify a Microsoft.AnalysisServices.Server object for -TargetObject.
</maml:para><maml:para>If -TargetObject is specified, do not specify -TargetExpression.
</maml:para></maml:description><command:parameterValue required="true" 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="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>TargetServerName</maml:name><maml:description><maml:para>Specifies the instance of the Database Engine that contains the target set. You can specify a variable that contains a Microsoft.SqlServer.Management.Sfc.Sdk.SQLStoreConnection object. You can also specify a string that complies with the formats that are used in the ConnectionString property of the System.Data.SqlClient.SQLConnection class. These include strings such as those created by using the System.Data.SqlClient.SqlConnectionStringBuilder class. By default, Invoke-PolicyEvaluation connects by using Windows Authentication.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>



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



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;sl "C:\Program Files (x86)\Microsoft SQL Server"
sl "120\Tools\Policies\DatabaseEngine\1033"
Invoke-PolicyEvaluation -Policy "Trustworthy Database.xml" -TargetServer "MYCOMPUTER"


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>Evaluate a policy on the default instance of the specified computer. Read the policy from an XML file and connect by using Windows Authentication.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 2 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;sl "C:\Program Files (x86)\Microsoft SQL Server"
sl "120\Tools\Policies\DatabaseEngine\1033"
gci "Database Status.xml", "Trustworthy Database.xml" | Invoke-PolicyEvaluation -TargetServer "MYCOMPUTER"


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>Use Get-Childitem to read two policies from XML files in a folder, and then pipe them to Invoke-PolicyEvaluation.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 3 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;sl "C:\Program Files (x86)\Microsoft SQL Server"
sl "120\Tools\Policies\DatabaseEngine\1033"
Invoke-PolicyEvaluation -Policy "Database Status.xml" -TargetServer "MYCOMPUTER" -OutputXML &gt; C:\MyReportFolder\MyReport.xml


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>Format the output of a policy evaluation by using the Services Modeling Language Interchange Format (SML-IF) schema, and then redirect the output to a file.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 4 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;sl SQLSERVER:\SQLPolicy\MYCOMPUTER\DEFAULT\Policies
gci | Where-Object { $_.PolicyCategory -eq "Microsoft Best Practices: Maintenance" } | Invoke-PolicyEvaluation -TargetServer "MYCOMPUTER"


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>Set the current path to a SQL Server policy store. Use Get-ChildItem to read all the polices, and Where-Object to filter for the policies that have their PolicyCategory property set to "Microsoft Best Practices: Maintenance".  Then pipe the filtered set of policies to Invoke-PolicyEvaluation.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 5 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;sl "C:\Program Files (x86)\Microsoft SQL Server"
sl "120\Tools\Policies\DatabaseEngine\1033"
$conn = New-Object Microsoft.SqlServer.Management.Sdk.Sfc.SqlStoreConnection("server='MYCOMPUTER';Trusted_Connection=True")
Invoke-PolicyEvaluation -Policy "Database Status.xml" -TargetServer $conn


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>How to use an Sfc.SqlStoreConnection object to specify the target server.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 6 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;sl "C:\Program Files (x86)\Microsoft SQL Server\120"
sl "tools\Policies\analysisservices\1033"
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices")
$SSASsvr = new-object Microsoft.AnalysisServices.Server
$SSASsvr.Connect("Data Source=localhost")
Invoke-PolicyEvaluation 'Surface Area Configuration for Analysis Services Features.xml' -TargetObject $SSASsvr


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>How to load the SQL Server Analysis Services assembly, and then create a connection to the default instance on the local computer and run the Analysis Services surface area configuration policy.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 7 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;sl "C:\Program Files (x86)\Microsoft SQL Server"
sl "120\Tools\Policies\DatabaseEngine\1033"
Invoke-PolicyEvaluation "Database Status.xml" -TargetServer "MYCOMPUTER" -TargetExpression "Server[@Name='MYCOMPUTER']/Database[@Name='AdventureWorks2014']"


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>Using a -TargetExpression query expression to specify that the Database Status policy be evaluated against the AdventureWorks2014 sample database.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 8 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;sl "C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Policies\ReportingServices\1033"
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Dmf.Adapters")
$SSRSsvr = new-object Microsoft.SqlServer.Management.Adapters.RSContainer('MyComputer')
Invoke-PolicyEvaluation -Policy "Surface Area Configuration for Reporting Services 2008 Features.xml" -TargetObject $SSRSsvr


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>How to load the SQL Server Reporting Services assembly, and then create a connection to the default instance on the local computer and run the Reporting Services surface area configuration policy.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Using the Invoke-PolicyEvaluation cmdlet</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Invoke-Sqlcmd</command:name><maml:description><maml:para>Runs a script containing statements from the languages (Transact-SQL and XQuery) and commands supported by the SQL Server sqlcmd utility.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Invoke</command:verb><command:noun>Sqlcmd</command:noun><dev:version /></command:details><maml:description><maml:para>Runs a script containing the languages and commands supported by the SQL Server sqlcmd utility. The languages supported are Transact-SQL and the XQuery syntax supported by the Database Engine. Invoke-Sqlcmd also accepts many of the  commands supported by sqlcmd, such as GO and QUIT. Invoke-Sqlcmd accepts the sqlcmd scripting variables, such as SQLCMDUSER. Invoke-Sqlcmd does not set sqlcmd scripting variables by default.
</maml:para><maml:para>Invoke-Sqlcmd does not support the sqlcmd commands primarily related to interactive script editing. The commands not supported include :!!, :connect, :error, :out, :ed, :list, :listvar, :reset, :perftrace, and :serverlist.
</maml:para><maml:para>The first result set the script returns is displayed as a formatted table.   Result sets after the first are not displayed if their column list is different from the column list of the first result set. If result sets after the first set have the same column list, their rows are appended to the formatted table that contains the rows that were returned by the first result set.
</maml:para><maml:para>Invoke-Sqlcmd does not return SQL Server message output, such as the output of PRINT statements, unless you use the PowerShell -Verbose parameter.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Invoke-Sqlcmd</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Query</maml:name><maml:description><maml:para>Specifies one or more queries to be run. The queries can be Transact-SQL or XQuery statements, or sqlcmd commands. Multiple queries separated by a semicolon can be specified. Do not specify the sqlcmd GO separator. 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="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AbortOnError</maml:name><maml:description><maml:para>Specifies that Invoke-Sqlcmd stop running and return an error level to the PowerShell ERRORLEVEL variable if Invoke-Sqlcmd encounters an error. The error level returned is 1 if the error has a severity higher than 10, and the error level is 0 if the error has a severity of 10 or less. If -ErrorLevel is also specified, Invoke-Sqlcmd returns 1 only if the error message severity is also equal to or higher than the value specified for -ErrorLevel.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>Specifies the number of seconds when Invoke-Sqlcmd times out if it cannot successfully connect to an instance of the Database Engine. The timeout value must be an integer between 0 and 65534. If 0 is specified, connection attempts do not time out.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>A character string specifying the name of a database. Invoke-Sqlcmd connects to this database in the instance that is specified in -ServerInstance.
</maml:para><maml:para>If -Database is not specified, the database that is used depends on whether the current path specifies both the SQLSERVER:\SQL folder and a database name. If the path specifies both the SQL folder and a database name, Invoke-Sqlcmd connects to the database that is specified in the path. If the path is not based on the SQL folder, or the path does not contain a database name, Invoke-Sqlcmd connects to the default database for the current login ID. If you specify the -IgnoreProviderContext switch, Invoke-Sqlcmd does not consider any database specified in the current path, and connects to the database defined as the default for the current login ID.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DedicatedAdministratorConnection</maml:name><maml:description><maml:para>Uses a Dedicated Administrator Connection (DAC) to connect to an instance of the Database Engine. DAC is used by system administrators for actions such as troubleshooting instances that will not accept new standard connections. The instance must be configured to support DAC. If DAC is not enabled, Invoke-Sqlcmd reports an error and stops running.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DisableCommands</maml:name><maml:description><maml:para>Turns off some sqlcmd features that might compromise security when run in batch files. It prevents PowerShell variables from being passed in to the Invoke-Sqlcmd script. The startup script specified in the SQLCMDINI scripting variable is not run.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DisableVariables</maml:name><maml:description><maml:para>Specifies that Invoke-Sqlcmd ignore sqlcmd scripting variables. This is useful when a script contains many INSERT statements that may contain strings that have the same format as variables, such as $(variable_name).
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptConnection</maml:name><maml:description><maml:para>Specifies whether Invoke-Sqlcmd uses Secure Sockets Layer (SSL) encryption for the connection to the instance of the Database Engine specified in -ServerInstance. If TRUE is specified SSL encryption is used. If FALSE is specified encryption is not used.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ErrorLevel</maml:name><maml:description><maml:para>Specifies that Invoke-Sqlcmd display only error messages whose severity level is equal to or higher than the value specified. All error messages are displayed if -ErrorLevel is not specified or set to 0. Database Engine error severities range from 1 to 24.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HostName</maml:name><maml:description><maml:para>Specifies a workstation name. The workstation name is reported by the sp_who system stored procedure and in the hostname column of the sys.processes catalog view. If HostName is not specified, the default is the name of the computer on which Invoke-Sqlcmd is running. HostName can be used to identify different Invoke-Sqlcmd sessions.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IgnoreProviderContext</maml:name><maml:description><maml:para>Invoke-Sqlcmd ignores the database context that was established by the current SQLSERVER:\SQL path. If the -Database parameter is not specified, Invoke-Sqlcmd uses the default database for the current login ID or Windows account.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IncludeSqlUserErrors</maml:name><maml:description><maml:para>Directs Invoke-Sqlcmd to return SQL user script errors that are otherwise ignored by default. If this parameter is specified, Invoke-Sqlcmd matches the default behavior of the sqlcmd utility.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>InputFile</maml:name><maml:description><maml:para>Specifies a file to be used as the query input to Invoke-Sqlcmd. The file can contain Transact-SQL statements, XQuery statements, and sqlcmd commands and scripting variables. Specify the full path to the file. Spaces are not allowed in the file path or file name.
</maml:para><maml:para>Only run scripts from trusted sources. Ensure all input scripts are secured with the appropriate NTFS permissions.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxBinaryLength</maml:name><maml:description><maml:para>Specifies the maximum number of bytes returned for columns with binary string data types, such as binary and varbinary. The default is 1,024 bytes.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxCharLength</maml:name><maml:description><maml:para>Specifies the maximum number of characters returned for columns with character or Unicode data types, such as char, nchar, varchar, and nvarchar. The default is 4,000 characters.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NewPassword</maml:name><maml:description><maml:para>Specifies a new password for a SQL Server Authentication login ID. Invoke-Sqlcmd changes the password and then exits. -Username and -Password must also be specified, with -Password specifying the current password for the login.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>OutputSqlErrors</maml:name><maml:description><maml:para>Specifies whether error messages are displayed in the Invoke-Sqlcmd output.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Password</maml:name><maml:description><maml:para>Specifies the password for the SQL Server Authentication login ID that was specified in -Username. Passwords are case-sensitive. When possible, use Windows Authentication. Do not use a blank password, when possible use a strong password. For more information, see "Strong Password" in SQL Server Books Online.
</maml:para><maml:para>SECURITY NOTE: If you type -Password followed by your password, the password is visible to anyone who can see your monitor. If you code -Password followed by your password in a .ps1 script, anyone reading the script file will see your password. Assign the appropriate NTFS permissions to the file to prevent other users from being able to read the file.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>QueryTimeout</maml:name><maml:description><maml:para>Specifies the number of seconds before the queries time out. If a timeout value is not specified, the queries do not time out. The timeout must be an integer between 1 and 65535.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>A character string or SMO server object specifying the name of an instance of the Database Engine. For default instances, only specify the computer name: "MyComputer". For named instances, use the format "ComputerName\InstanceName".
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SeverityLevel</maml:name><maml:description><maml:para>Specifies the lower limit for the error message severity level Invoke-Sqlcmd returns to the ERRORLEVEL PowerShell variable. Invoke-Sqlcmd returns the highest severity level from the error messages generated by the queries it runs, provided that severity is equal to or higher than -SeverityLevel. If -SeverityLevel is not specified or set to 0, Invoke-Sqlcmd returns 0 to ERRORLEVEL. The severity levels of Database Engine error messages range from 1 to 24. Invoke-Sqlcmd does not report severities for informational messages that have a severity of 10.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SuppressProviderContextWarning</maml:name><maml:description><maml:para>Suppresses the warning that Invoke-Sqlcmd has used the database context from the current SQLSERVER:\SQL path setting to establish the database context for the cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Username</maml:name><maml:description><maml:para>Specifies the login ID for making a SQL Server Authentication connection to an instance of the Database Engine. The password must be specified using -Password. If -Username and -Password are not specified, Invoke-Sqlcmd attempts a Windows Authentication connection using the Windows account running the PowerShell session.
</maml:para><maml:para>When possible, use Windows Authentication.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Variable</maml:name><maml:description><maml:para>Creates a sqlcmd scripting variable for use in the sqlcmd script, and sets a value for the variable. Use a PowerShell array to specify multiple variables and their values.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AbortOnError</maml:name><maml:description><maml:para>Specifies that Invoke-Sqlcmd stop running and return an error level to the PowerShell ERRORLEVEL variable if Invoke-Sqlcmd encounters an error. The error level returned is 1 if the error has a severity higher than 10, and the error level is 0 if the error has a severity of 10 or less. If -ErrorLevel is also specified, Invoke-Sqlcmd returns 1 only if the error message severity is also equal to or higher than the value specified for -ErrorLevel.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>Specifies the number of seconds when Invoke-Sqlcmd times out if it cannot successfully connect to an instance of the Database Engine. The timeout value must be an integer between 0 and 65534. If 0 is specified, connection attempts do not time out.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>A character string specifying the name of a database. Invoke-Sqlcmd connects to this database in the instance that is specified in -ServerInstance.
</maml:para><maml:para>If -Database is not specified, the database that is used depends on whether the current path specifies both the SQLSERVER:\SQL folder and a database name. If the path specifies both the SQL folder and a database name, Invoke-Sqlcmd connects to the database that is specified in the path. If the path is not based on the SQL folder, or the path does not contain a database name, Invoke-Sqlcmd connects to the default database for the current login ID. If you specify the -IgnoreProviderContext switch, Invoke-Sqlcmd does not consider any database specified in the current path, and connects to the database defined as the default for the current login ID.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DedicatedAdministratorConnection</maml:name><maml:description><maml:para>Uses a Dedicated Administrator Connection (DAC) to connect to an instance of the Database Engine. DAC is used by system administrators for actions such as troubleshooting instances that will not accept new standard connections. The instance must be configured to support DAC. If DAC is not enabled, Invoke-Sqlcmd reports an error and stops running.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DisableCommands</maml:name><maml:description><maml:para>Turns off some sqlcmd features that might compromise security when run in batch files. It prevents PowerShell variables from being passed in to the Invoke-Sqlcmd script. The startup script specified in the SQLCMDINI scripting variable is not run.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DisableVariables</maml:name><maml:description><maml:para>Specifies that Invoke-Sqlcmd ignore sqlcmd scripting variables. This is useful when a script contains many INSERT statements that may contain strings that have the same format as variables, such as $(variable_name).
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptConnection</maml:name><maml:description><maml:para>Specifies whether Invoke-Sqlcmd uses Secure Sockets Layer (SSL) encryption for the connection to the instance of the Database Engine specified in -ServerInstance. If TRUE is specified SSL encryption is used. If FALSE is specified encryption is not used.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ErrorLevel</maml:name><maml:description><maml:para>Specifies that Invoke-Sqlcmd display only error messages whose severity level is equal to or higher than the value specified. All error messages are displayed if -ErrorLevel is not specified or set to 0. Database Engine error severities range from 1 to 24.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HostName</maml:name><maml:description><maml:para>Specifies a workstation name. The workstation name is reported by the sp_who system stored procedure and in the hostname column of the sys.processes catalog view. If HostName is not specified, the default is the name of the computer on which Invoke-Sqlcmd is running. HostName can be used to identify different Invoke-Sqlcmd sessions.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IgnoreProviderContext</maml:name><maml:description><maml:para>Invoke-Sqlcmd ignores the database context that was established by the current SQLSERVER:\SQL path. If the -Database parameter is not specified, Invoke-Sqlcmd uses the default database for the current login ID or Windows account.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IncludeSqlUserErrors</maml:name><maml:description><maml:para>Directs Invoke-Sqlcmd to return SQL user script errors that are otherwise ignored by default. If this parameter is specified, Invoke-Sqlcmd matches the default behavior of the sqlcmd utility.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>InputFile</maml:name><maml:description><maml:para>Specifies a file to be used as the query input to Invoke-Sqlcmd. The file can contain Transact-SQL statements, XQuery statements, and sqlcmd commands and scripting variables. Specify the full path to the file. Spaces are not allowed in the file path or file name.
</maml:para><maml:para>Only run scripts from trusted sources. Ensure all input scripts are secured with the appropriate NTFS permissions.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxBinaryLength</maml:name><maml:description><maml:para>Specifies the maximum number of bytes returned for columns with binary string data types, such as binary and varbinary. The default is 1,024 bytes.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxCharLength</maml:name><maml:description><maml:para>Specifies the maximum number of characters returned for columns with character or Unicode data types, such as char, nchar, varchar, and nvarchar. The default is 4,000 characters.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NewPassword</maml:name><maml:description><maml:para>Specifies a new password for a SQL Server Authentication login ID. Invoke-Sqlcmd changes the password and then exits. -Username and -Password must also be specified, with -Password specifying the current password for the login.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>OutputSqlErrors</maml:name><maml:description><maml:para>Specifies whether error messages are displayed in the Invoke-Sqlcmd output.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue><dev:type><maml:name>Boolean</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Password</maml:name><maml:description><maml:para>Specifies the password for the SQL Server Authentication login ID that was specified in -Username. Passwords are case-sensitive. When possible, use Windows Authentication. Do not use a blank password, when possible use a strong password. For more information, see "Strong Password" in SQL Server Books Online.
</maml:para><maml:para>SECURITY NOTE: If you type -Password followed by your password, the password is visible to anyone who can see your monitor. If you code -Password followed by your password in a .ps1 script, anyone reading the script file will see your password. Assign the appropriate NTFS permissions to the file to prevent other users from being able to read the file.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Query</maml:name><maml:description><maml:para>Specifies one or more queries to be run. The queries can be Transact-SQL or XQuery statements, or sqlcmd commands. Multiple queries separated by a semicolon can be specified. Do not specify the sqlcmd GO separator. 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="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>QueryTimeout</maml:name><maml:description><maml:para>Specifies the number of seconds before the queries time out. If a timeout value is not specified, the queries do not time out. The timeout must be an integer between 1 and 65535.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>A character string or SMO server object specifying the name of an instance of the Database Engine. For default instances, only specify the computer name: "MyComputer". For named instances, use the format "ComputerName\InstanceName".
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SeverityLevel</maml:name><maml:description><maml:para>Specifies the lower limit for the error message severity level Invoke-Sqlcmd returns to the ERRORLEVEL PowerShell variable. Invoke-Sqlcmd returns the highest severity level from the error messages generated by the queries it runs, provided that severity is equal to or higher than -SeverityLevel. If -SeverityLevel is not specified or set to 0, Invoke-Sqlcmd returns 0 to ERRORLEVEL. The severity levels of Database Engine error messages range from 1 to 24. Invoke-Sqlcmd does not report severities for informational messages that have a severity of 10.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SuppressProviderContextWarning</maml:name><maml:description><maml:para>Suppresses the warning that Invoke-Sqlcmd has used the database context from the current SQLSERVER:\SQL path setting to establish the database context for the cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Username</maml:name><maml:description><maml:para>Specifies the login ID for making a SQL Server Authentication connection to an instance of the Database Engine. The password must be specified using -Password. If -Username and -Password are not specified, Invoke-Sqlcmd attempts a Windows Authentication connection using the Windows account running the PowerShell session.
</maml:para><maml:para>When possible, use Windows Authentication.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Variable</maml:name><maml:description><maml:para>Creates a sqlcmd scripting variable for use in the sqlcmd script, and sets a value for the variable. Use a PowerShell array to specify multiple variables and their values.
</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:parameters><command:inputTypes><command:inputType><dev:type><maml:name>PSObject</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>Formatted table</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> 
 
-------------------------- EXAMPLE 1 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Invoke-Sqlcmd -Query "SELECT GETDATE() AS TimeOfQuery;" -ServerInstance "MyComputer\MyInstance"

TimeOfQuery
-----------
5/13/2010 8:49:43 PM


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This example connects to a named instance of the Database Engine on a computer and runs a basic Transact-SQL script.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 2 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Invoke-Sqlcmd -InputFile "C:\MyFolder\TestSqlCmd.sql" | Out-File -filePath "C:\MyFolder\TestSqlCmd.rpt"

Output sent to TestSqlCmd.rpt.


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This example reads a file containing Transact-SQL statements and sqlcmd commands, runs the file, and writes the output to another file. Ensure all output files are secured with the appropriate NTFS permissions.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 3 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$MyArray = "MYVAR1='String1'", "MYVAR2='String2'"
Invoke-Sqlcmd -Query "SELECT `$(MYVAR1) AS Var1, `$(MYVAR2) AS Var2;" -Variable $MyArray

Var1                        Var2
----                        ----
String1                     String2


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This example uses an array of character strings as input to the -Variable parameter. The array defines multiple sqlcmd variables. The $ signs in the SELECT statement that identify the sqlcmd variables are escaped using the back-tick (`) character.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 4 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-Location SQLSERVER:\SQL\MyComputer\MyInstance
Invoke-Sqlcmd -Query "SELECT SERVERPROPERTY('MachineName') AS ComputerName;" -ServerInstance (Get-Item .)

WARNING: Using provider context. Server = MyComputer

ComputerName
------------
MyComputer


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This example uses Set-Location to navigate to the SQL Server PowerShell provider path for an instance of the Database Engine. Then the example uses Get-Item to retrieve an SMO Server object for use as the -ServerInstance parameter of Invoke-Sqlcmd.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 5 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Invoke-Sqlcmd -Query "PRINT N'abc'" -Verbose

VERBOSE: abc


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This example uses the PowerShell -Verbose parameter to return the message output of the PRINT command.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 6 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-Location SQLSERVER:\SQL\MyComputer\DEFAULT\Databases\AdventureWorks2014
Invoke-Sqlcmd "SELECT DB_NAME() AS DatabaseName;"

WARNING: Using provider context. Server = MyComputer, Database = AdventureWorks2014.

DatabaseName
------------
AdventureWorks2014


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This examples uses a positional string to supply the input to the -Query parameter. It also shows how Invoke-Sqlcmd uses the current path to set the database context to AdventureWorks2014.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Transact-SQL Reference</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: sqlcmd Utility</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: XQuery Reference</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Join-SqlAvailabilityGroup</command:name><maml:description><maml:para>Joins the availability replica specified in the InputObject or Path parameter to the availability group specified by the Name parameter. </maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Join</command:verb><command:noun>SqlAvailabilityGroup</command:noun><dev:version /></command:details><maml:description><maml:para>The Join-SqlAvailabilityGroup cmdlet joins the local secondary replica to the availability group that is specified in the Name parameter.  This cmdlet can be executed only on an instance of SQL Server that is hosting a secondary replica that has not yet been joined to the availability group.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Join-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the availability group.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server that hosts the secondary replica to be joined to the availability group. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Join-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the availability group.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object of the instance of SQL Server that hosts the secondary replica.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object of the instance of SQL Server that hosts the secondary replica.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Server</command:parameterValue><dev:type><maml:name>Server</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the availability group.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server that hosts the secondary replica to be joined to the availability group. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>

The availability replica to be joined to the availability group.


</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><maml:alertSet><maml:title /><maml:alert><maml:para>The high availability data recovery service must be enabled on the server instance, the availability replica specified by Path must exist.
</maml:para></maml:alert><maml:alert></maml:alert></maml:alertSet><command:examples><command:example><maml:title> 
 
-------------------------- EXAMPLE 1 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Join-SqlAvailabilityGroup -Path SQLSERVER:\SQL\SecondaryServer\InstanceName -Name 'MyAg'


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command joins a secondary replica hosted by the server instance located at the specified path to the availability group named 'MyAg'.  This server instance must host a secondary replica in this availability group.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 2 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Join-SqlAvailabilityGroup -Path SQLSERVER:\SQL\SecondaryServer\InstanceName -Name 'MyAg' -Script


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command outputs the Transact-SQL script that joins a secondary replica hosted by the server instance located at the specified path to the availability group named 'MyAg'.  This server instance must host a secondary replica in this availability group.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Joining a Secondary Replica to an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlAvailabilityGroup</command:name><maml:description><maml:para>Creates an availability group on the server instance that will host the initial primary replica.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlAvailabilityGroup</command:noun><dev:version /></command:details><maml:description><maml:para>The New-SqlAvailabilityGroup cmdlet creates an availability group. The server instance specified by the InputObject or Path parameter will host the initial primary replica.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the availability group to be created.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server that will host the initial primary replica of the availability group. If the specified path does not exist an error is thrown. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>The automated backup preference for the availability group. Valid options are:
</maml:para><maml:para>Primary: Specifies that the backups always occur on the primary replica. This is often because the user needs features not available when backup is run on a secondary, such as differential backups.
</maml:para><maml:para>SecondaryOnly: Specifies that backups are never performed on primary replicas. If the primary replica is the only replica online, the backup will not occur.
</maml:para><maml:para>Secondary: Specifies that backups occur on secondary replicas unless the primary replica is the only replica online. Then the backup occurs on the primary replica.
</maml:para><maml:para>None: This option specifies that the user does not want primary/secondary status taken into account when choosing the replica to perform backups. The BackupPriority in combination with the Online/Connected status are the only factors considered.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>A list of local, read-write user databases that use the full recovery model and do not use AUTO_CLOSE. These databases cannot belong to another availability group and cannot be configured for database mirroring. This parameter cannot be null or empty.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>Determines the automatic failover behavior of the availability group. Valid options are:
</maml:para><maml:para>OnServerDown: Failover or restart when the SQL Server service stops.
</maml:para><maml:para>OnServerUnresponsive: Failover or restart when any condition of lower value is satisfied, plus when the SQL Server service is connected to the cluster and the "HealthCheckTimeout" threshold is exceeded, or when the Availability Replica currently in primary role is in a failed state. (See HealthCheckTimeout parameter.)
</maml:para><maml:para>OnCriticalServerError: Failover or restart when any condition of lower value is satisfied, plus when an internal critical Server error occurs (out of memory condition, serious write-access violation, or too much dumping).
</maml:para><maml:para>OnModerateServerError: Failover or restart when any condition of lower value is satisfied, plus when a moderate Server error occurs (persistent out of memory condition).
</maml:para><maml:para>OnAnyQualifiedFailureConditions: Failover or restart when any condition of lower value is satisfied, plus when a qualifying failure condition occurs (engine worker thread exhaustion, unsolvable deadlock detected).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>The length of time after which an unresponsive server is declared unhealthy.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityReplica</maml:name><maml:description><maml:para>The AvailabilityReplica object for each availability replica you want to include in the new availability group. This parameter can be nested, but it cannot be empty or null.
</maml:para><maml:para>TIP: To create AvailabilityReplica objects, use the New-SqlAvailabilityReplica cmdlet with the AsTemplate parameter.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">AvailabilityReplica[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the availability group to be created.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object of the instance that hosts the primary replica.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>The automated backup preference for the availability group. Valid options are:
</maml:para><maml:para>Primary: Specifies that the backups always occur on the primary replica. This is often because the user needs features not available when backup is run on a secondary, such as differential backups.
</maml:para><maml:para>SecondaryOnly: Specifies that backups are never performed on primary replicas. If the primary replica is the only replica online, the backup will not occur.
</maml:para><maml:para>Secondary: Specifies that backups occur on secondary replicas unless the primary replica is the only replica online. Then the backup occurs on the primary replica.
</maml:para><maml:para>None: This option specifies that the user does not want primary/secondary status taken into account when choosing the replica to perform backups. The BackupPriority in combination with the Online/Connected status are the only factors considered.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>A list of local, read-write user databases that use the full recovery model and do not use AUTO_CLOSE. These databases cannot belong to another availability group and cannot be configured for database mirroring. This parameter cannot be null or empty.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>Determines the automatic failover behavior of the availability group. Valid options are:
</maml:para><maml:para>OnServerDown: Failover or restart when the SQL Server service stops.
</maml:para><maml:para>OnServerUnresponsive: Failover or restart when any condition of lower value is satisfied, plus when the SQL Server service is connected to the cluster and the "HealthCheckTimeout" threshold is exceeded, or when the Availability Replica currently in primary role is in a failed state. (See HealthCheckTimeout parameter.)
</maml:para><maml:para>OnCriticalServerError: Failover or restart when any condition of lower value is satisfied, plus when an internal critical Server error occurs (out of memory condition, serious write-access violation, or too much dumping).
</maml:para><maml:para>OnModerateServerError: Failover or restart when any condition of lower value is satisfied, plus when a moderate Server error occurs (persistent out of memory condition).
</maml:para><maml:para>OnAnyQualifiedFailureConditions: Failover or restart when any condition of lower value is satisfied, plus when a qualifying failure condition occurs (engine worker thread exhaustion, unsolvable deadlock detected).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>The length of time after which an unresponsive server is declared unhealthy.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityReplica</maml:name><maml:description><maml:para>The AvailabilityReplica object for each availability replica you want to include in the new availability group. This parameter can be nested, but it cannot be empty or null.
</maml:para><maml:para>TIP: To create AvailabilityReplica objects, use the New-SqlAvailabilityReplica cmdlet with the AsTemplate parameter.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">AvailabilityReplica[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>The automated backup preference for the availability group. Valid options are:
</maml:para><maml:para>Primary: Specifies that the backups always occur on the primary replica. This is often because the user needs features not available when backup is run on a secondary, such as differential backups.
</maml:para><maml:para>SecondaryOnly: Specifies that backups are never performed on primary replicas. If the primary replica is the only replica online, the backup will not occur.
</maml:para><maml:para>Secondary: Specifies that backups occur on secondary replicas unless the primary replica is the only replica online. Then the backup occurs on the primary replica.
</maml:para><maml:para>None: This option specifies that the user does not want primary/secondary status taken into account when choosing the replica to perform backups. The BackupPriority in combination with the Online/Connected status are the only factors considered.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue><dev:type><maml:name>AvailabilityGroupAutomatedBackupPreference</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityReplica</maml:name><maml:description><maml:para>The AvailabilityReplica object for each availability replica you want to include in the new availability group. This parameter can be nested, but it cannot be empty or null.
</maml:para><maml:para>TIP: To create AvailabilityReplica objects, use the New-SqlAvailabilityReplica cmdlet with the AsTemplate parameter.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">AvailabilityReplica[]</command:parameterValue><dev:type><maml:name>AvailabilityReplica[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>A list of local, read-write user databases that use the full recovery model and do not use AUTO_CLOSE. These databases cannot belong to another availability group and cannot be configured for database mirroring. This parameter cannot be null or empty.
</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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>Determines the automatic failover behavior of the availability group. Valid options are:
</maml:para><maml:para>OnServerDown: Failover or restart when the SQL Server service stops.
</maml:para><maml:para>OnServerUnresponsive: Failover or restart when any condition of lower value is satisfied, plus when the SQL Server service is connected to the cluster and the "HealthCheckTimeout" threshold is exceeded, or when the Availability Replica currently in primary role is in a failed state. (See HealthCheckTimeout parameter.)
</maml:para><maml:para>OnCriticalServerError: Failover or restart when any condition of lower value is satisfied, plus when an internal critical Server error occurs (out of memory condition, serious write-access violation, or too much dumping).
</maml:para><maml:para>OnModerateServerError: Failover or restart when any condition of lower value is satisfied, plus when a moderate Server error occurs (persistent out of memory condition).
</maml:para><maml:para>OnAnyQualifiedFailureConditions: Failover or restart when any condition of lower value is satisfied, plus when a qualifying failure condition occurs (engine worker thread exhaustion, unsolvable deadlock detected).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue><dev:type><maml:name>AvailabilityGroupFailureConditionLevel</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>The length of time after which an unresponsive server is declared unhealthy.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object of the instance that hosts the primary replica.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the availability group to be created.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server that will host the initial primary replica of the availability group. If the specified path does not exist an error is thrown. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>

Specifies the server instance that contains the the primary replica.
</maml:para><maml:para>
</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>

A new power shell object containing the availability group.


</maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> 
 
-------------------------- EXAMPLE 1 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$primaryServer = Get-Item "SQLSERVER:\SQL\PrimaryServer\InstanceName"
$secondaryServer = Get-Item "SQLSERVER:\SQL\SecondaryServer\InstanceName"

$primaryReplica = New-SqlAvailabilityReplica `
-Name "PrimaryServer\InstanceName" `
-EndpointUrl "TCP://PrimaryServer.domain:5022" `
-FailoverMode "Automatic" `
-AvailabilityMode "SynchronousCommit" `
-AsTemplate `
-Version ($primaryServer.Version)

# Create the initial secondary replica
$secondaryReplica = New-SqlAvailabilityReplica `
-Name "SecondaryServer\InstanceName" `
-EndpointUrl "TCP://SecondaryServer.domain:5022" `
-FailoverMode "Automatic" `
-AvailabilityMode "SynchronousCommit" `
-AsTemplate `
-Version ($secondaryServer.Version)

# Create the Availability Group.
New-SqlAvailabilityGroup -InputObject $primaryServer -Name MyAG -AvailabilityReplica ($primaryReplica, $secondaryReplica) -Database @("MyDatabase1","MyDatabase2")


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This example creates a new availability group, 'MyAG', with two availability replicas and two databases ('MyDatabase1' and 'MyDatabase2'). First, the example uses the New-SqlAvailabilityReplica cmdlet to create in-memory representations of the two replicas ('$primaryReplica' and '$secondaryReplica'). These replicas are configured to use synchronous-commit availability mode with automatic failover. Their database mirroring endpoints use port 5022. The example then uses the New-SqlAvailabilityGroup cmdlet to create the availability group.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Creating an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: "HADR" Prerequisites and Restrictions</maml:linkText><maml:uri /></maml:navigationLink><maml:navigationLink><maml:linkText>SQL Server Books Online: Specifying the Endpoint URL for an Availability Replica (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlAvailabilityGroupListener</command:name><maml:description><maml:para>Creates a new availability group listener and attaches it to an existing availability group.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlAvailabilityGroupListener</command:noun><dev:version /></command:details><maml:description><maml:para>The New-SqlAvailabilityGroupListener cmdlet creates a new availability group listener, and attaches it to an availability group. It takes parameters that identify the availability group and the IP addresses. This cmdlet can be executed only at the server instance that hosts the primary replica.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlAvailabilityGroupListener</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the listener.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group. The new listener will attach to the availability group specified by this path. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DhcpSubnet</maml:name><maml:description><maml:para>Specifies that the listener should use DHCP on the subnet specified by the argument. This argument should be an IPv4 Address and subnet mask in slash notation, for example 192.168.0.1\255.255.255.0.
</maml:para><maml:para>StaticIp and DhcpSubnet are mutually exclusive options.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>The port that the listener will use to listen for connections. The default port is TCP port 1433. If you have security concerns, we recommend using a different port number.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>Specifies that the listener should be configured with the static IP addresses specified by the argument. This argument should be a list of strings. Each of these strings can be either an IPv4 address and subnet mask in slash notation, or an IPv6 address.
</maml:para><maml:para>StaticIp and DhcpSubnet are mutually exclusive options.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlAvailabilityGroupListener</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the listener.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Availability Group object of the availability group to which we should attach the listener.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DhcpSubnet</maml:name><maml:description><maml:para>Specifies that the listener should use DHCP on the subnet specified by the argument. This argument should be an IPv4 Address and subnet mask in slash notation, for example 192.168.0.1\255.255.255.0.
</maml:para><maml:para>StaticIp and DhcpSubnet are mutually exclusive options.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>The port that the listener will use to listen for connections. The default port is TCP port 1433. If you have security concerns, we recommend using a different port number.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>Specifies that the listener should be configured with the static IP addresses specified by the argument. This argument should be a list of strings. Each of these strings can be either an IPv4 address and subnet mask in slash notation, or an IPv6 address.
</maml:para><maml:para>StaticIp and DhcpSubnet are mutually exclusive options.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DhcpSubnet</maml:name><maml:description><maml:para>Specifies that the listener should use DHCP on the subnet specified by the argument. This argument should be an IPv4 Address and subnet mask in slash notation, for example 192.168.0.1\255.255.255.0.
</maml:para><maml:para>StaticIp and DhcpSubnet are mutually exclusive options.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Availability Group object of the availability group to which we should attach the listener.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the listener.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group. The new listener will attach to the availability group specified by this path. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>The port that the listener will use to listen for connections. The default port is TCP port 1433. If you have security concerns, we recommend using a different port number.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue>65535 </dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StaticIp</maml:name><maml:description><maml:para>Specifies that the listener should be configured with the static IP addresses specified by the argument. This argument should be a list of strings. Each of these strings can be either an IPv4 address and subnet mask in slash notation, or an IPv6 address.
</maml:para><maml:para>StaticIp and DhcpSubnet are mutually exclusive options.
</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" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>



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



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlAvailabilityGroupListener -Name MyListener -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates an availability group listener named 'MyListener' for the availability group 'MyAg'. This listener will use DHCP to acquire a virtual IP address. This command must be executed on the server instance that hosts the primary replica.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 2 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlAvailabilityGroupListener -Name MyListener -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg -Port 1434


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates an availability group listener named 'MyListener' for the availability group 'MyAg'. This listener will use DHCP to acquire a virtual IP address and will listen for connections on port 1434. This command must be executed on the server instance that hosts the primary replica.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 3 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlAvailabilityGroupListener -Name MyListener -DhcpSubnet '192.169.0.1/255.255.252.0' -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates an availability group listener named 'MyListener' for the availability group 'MyAg'. This listener will use DHCP on the specified subnet to acquire a virtual IP address. This command must be executed on the server instance that hosts the primary replica.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 4 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlAvailabilityGroupListener -Name MyListener -StaticIp '192.168.3.1/255.255.252.0' -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates an availability group listener named 'MyListener' for the availability group 'MyAg'. This listener will use the IPv4 address passed to the -StaticIp parameter as its virtual IP address.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 5 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlAvailabilityGroupListener -Name MyListener -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg -Script


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command outputs a Transact-SQL script that creates an availability group listener named 'MyListener' for the availability group 'MyAg'. The listener is not actually created by this command.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlAvailabilityReplica</command:name><maml:description><maml:para>Creates an availability replica. This cmdlet must be executed on the server instance that hosts the primary availability replica.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlAvailabilityReplica</command:noun><dev:version /></command:details><maml:description><maml:para>The New-SqlAvailabilityReplica cmdlet creates an availability replica. This cmdlet must be executed on the instance of SQL Server that hosts the primary replica.
</maml:para><maml:para>The AsTemplate, InputObject, and Path parameters are mutually exclusive.
</maml:para><maml:para>To create AvailabilityReplica objects before creating a new availability group, use the AsTemplate parameter.
</maml:para><maml:para>When adding a replica to an existing availability group use either the InputObject or Path parameter to specify the path of the availability group. If neither is specified, the current path is used.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the new availability replica. Specify this name using the computer\instance format.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group. The new replica will belong to the availability group at this path. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>This option is an integer in the range of 0..100, and represents the desired priority of the replicas in performing backups. Of the set of replicas which are online and available, the replica with the highest priority will be chosen to perform the backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>How the availability replica should handle connections when in the primary role. Valid settings are:
</maml:para><maml:para>AllowReadWriteConnections: Allow read/write connections
</maml:para><maml:para>AllowAllConnections: Allow all connections
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>How the availability replica should handle connections when in the secondary role. Valid settings are:
</maml:para><maml:para>AllowNoConnections: Disallows connections
</maml:para><maml:para>AllowReadIntentConnectionsOnly: Allows only read-intent connections
</maml:para><maml:para>AllowAllConnections: Allows all connections
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>The connectivity fully-qualified domain name (FQDN) and port to use when routing to the replica for read only connections. For example:
</maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>An ordered list of replica server names that represent the probe sequence for connection director to use when redirecting read-only connections through this availability replica. This is applicable when the availability replica is the current primary of the availability group.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>The number of seconds to wait for a response between the primary replica and this replica before considering the connection failed.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>Indicates whether Replica is Synchronous Commit or Asynchronous Commit mode. It can be null.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>The URL of the database mirroring endpoint. This URL is a TCP address in the form TCP://system-address:port.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>Can be Automatic or Manual. It can be null.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the new availability replica. Specify this name using the computer\instance format.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AsTemplate</maml:name><maml:description><maml:para>The path of a new availability replica for which you want to create a temporary AvailabilityReplica object in memory. Use AsTemplate to create each new availability replica that you plan to include in a new availability group. Then, create the availability group by running the New-SqlAvailabilityGroup cmdlet and specify the AvailabilityReplica objects as values of the AvailabilityReplica parameter.
</maml:para><maml:para>When AsTemplate is specified the InputObject and Path parameters are ignored.
</maml:para><maml:para>When AsTemplate is specified, you must pass a SQL Server version to the Version parameter or your current session must have an active connection to an instance.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>This option is an integer in the range of 0..100, and represents the desired priority of the replicas in performing backups. Of the set of replicas which are online and available, the replica with the highest priority will be chosen to perform the backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>How the availability replica should handle connections when in the primary role. Valid settings are:
</maml:para><maml:para>AllowReadWriteConnections: Allow read/write connections
</maml:para><maml:para>AllowAllConnections: Allow all connections
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>How the availability replica should handle connections when in the secondary role. Valid settings are:
</maml:para><maml:para>AllowNoConnections: Disallows connections
</maml:para><maml:para>AllowReadIntentConnectionsOnly: Allows only read-intent connections
</maml:para><maml:para>AllowAllConnections: Allows all connections
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>The connectivity fully-qualified domain name (FQDN) and port to use when routing to the replica for read only connections. For example:
</maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>An ordered list of replica server names that represent the probe sequence for connection director to use when redirecting read-only connections through this availability replica. This is applicable when the availability replica is the current primary of the availability group.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>The number of seconds to wait for a response between the primary replica and this replica before considering the connection failed.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Version</maml:name><maml:description><maml:para>Specifies a SQL Server version. This parameter is only relevant if AsTemplate is specified. The template object is created in design mode on a server with this version.
</maml:para><maml:para>Version can be specified as an integer or string, if desired. For example: -Version 12, or -Version "12.0.0"
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerVersion</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>Indicates whether Replica is Synchronous Commit or Asynchronous Commit mode. It can be null.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>The URL of the database mirroring endpoint. This URL is a TCP address in the form TCP://system-address:port.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>Can be Automatic or Manual. It can be null.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the new availability replica. Specify this name using the computer\instance format.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityGroup object of the availability group to which the new replica will belong.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>This option is an integer in the range of 0..100, and represents the desired priority of the replicas in performing backups. Of the set of replicas which are online and available, the replica with the highest priority will be chosen to perform the backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>How the availability replica should handle connections when in the primary role. Valid settings are:
</maml:para><maml:para>AllowReadWriteConnections: Allow read/write connections
</maml:para><maml:para>AllowAllConnections: Allow all connections
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>How the availability replica should handle connections when in the secondary role. Valid settings are:
</maml:para><maml:para>AllowNoConnections: Disallows connections
</maml:para><maml:para>AllowReadIntentConnectionsOnly: Allows only read-intent connections
</maml:para><maml:para>AllowAllConnections: Allows all connections
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>The connectivity fully-qualified domain name (FQDN) and port to use when routing to the replica for read only connections. For example:
</maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>An ordered list of replica server names that represent the probe sequence for connection director to use when redirecting read-only connections through this availability replica. This is applicable when the availability replica is the current primary of the availability group.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>The number of seconds to wait for a response between the primary replica and this replica before considering the connection failed.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>Indicates whether Replica is Synchronous Commit or Asynchronous Commit mode. It can be null.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>The URL of the database mirroring endpoint. This URL is a TCP address in the form TCP://system-address:port.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>Can be Automatic or Manual. It can be null.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AsTemplate</maml:name><maml:description><maml:para>The path of a new availability replica for which you want to create a temporary AvailabilityReplica object in memory. Use AsTemplate to create each new availability replica that you plan to include in a new availability group. Then, create the availability group by running the New-SqlAvailabilityGroup cmdlet and specify the AvailabilityReplica objects as values of the AvailabilityReplica parameter.
</maml:para><maml:para>When AsTemplate is specified the InputObject and Path parameters are ignored.
</maml:para><maml:para>When AsTemplate is specified, you must pass a SQL Server version to the Version parameter or your current session must have an active connection to an instance.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>0</dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>Indicates whether Replica is Synchronous Commit or Asynchronous Commit mode. It can be null.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue><dev:type><maml:name>AvailabilityReplicaAvailabilityMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>This option is an integer in the range of 0..100, and represents the desired priority of the replicas in performing backups. Of the set of replicas which are online and available, the replica with the highest priority will be chosen to perform the backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>How the availability replica should handle connections when in the primary role. Valid settings are:
</maml:para><maml:para>AllowReadWriteConnections: Allow read/write connections
</maml:para><maml:para>AllowAllConnections: Allow all connections
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue><dev:type><maml:name>AvailabilityReplicaConnectionModeInPrimaryRole</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>How the availability replica should handle connections when in the secondary role. Valid settings are:
</maml:para><maml:para>AllowNoConnections: Disallows connections
</maml:para><maml:para>AllowReadIntentConnectionsOnly: Allows only read-intent connections
</maml:para><maml:para>AllowAllConnections: Allows all connections
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue><dev:type><maml:name>AvailabilityReplicaConnectionModeInSecondaryRole</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>The URL of the database mirroring endpoint. This URL is a TCP address in the form TCP://system-address:port.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>Can be Automatic or Manual. It can be null.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue><dev:type><maml:name>AvailabilityReplicaFailoverMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityGroup object of the availability group to which the new replica will belong.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the new availability replica. Specify this name using the computer\instance format.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group. The new replica will belong to the availability group at this path. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>The connectivity fully-qualified domain name (FQDN) and port to use when routing to the replica for read only connections. For example:
</maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>An ordered list of replica server names that represent the probe sequence for connection director to use when redirecting read-only connections through this availability replica. This is applicable when the availability replica is the current primary 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>The number of seconds to wait for a response between the primary replica and this replica before considering the connection failed.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Version</maml:name><maml:description><maml:para>Specifies a SQL Server version. This parameter is only relevant if AsTemplate is specified. The template object is created in design mode on a server with this version.
</maml:para><maml:para>Version can be specified as an integer or string, if desired. For example: -Version 12, or -Version "12.0.0"
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerVersion</command:parameterValue><dev:type><maml:name>ServerVersion</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>

Specifies the availability group for the replica.


</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityReplica</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>

A power shell object that contains the newly created availability replica.


</maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> 
 
-------------------------- EXAMPLE 1 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$serverObject = (Get-Item SQLSERVER:\Sql\PrimaryServer\InstanceName)
$serverVersion = $serverObject.Version
$endpointURL = "TCP://PrimaryServerName.domain.com:5022"
$failoverMode = "Automatic"
$availabilityMode = "SynchronousCommit"
New-SqlAvailabilityReplica -Name PrimaryServer\Instance -EndpointUrl $endpointURL -FailoverMode $failoverMode -AvailabilityMode $availabilityMode -AsTemplate -Version $serverVersion


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This example creates an in-memory representation of an availability replica. No changes are committed to the server. This replica should be passed to the AvailabilityReplica parameter of the New-SqlAvailabilityGroup cmdlet. This replica will use the database mirroring endpoint located at the specified URL to communicate with other replicas in the availability group. This replica supports automatic failover and the synchronous-commit availability mode. The -AsTemplate and -Version parameters are required to construct the in-memory representation. The -Version parameter specifies the version of the server instance that will host this replica. The version number must be 11.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 2 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$serverObject = (Get-Item SQLSERVER:\Sql\PrimaryServer\InstanceName)
$serverVersion = $serverObject.Version
$endpointURL = "TCP://PrimaryServerName.domain.com:5022"
$failoverMode = "Manual"
$availabilityMode = "AsynchronousCommit"
New-SqlAvailabilityReplica -Name SecondaryServer\Instance -EndpointUrl $endpointURL -FailoverMode $failoverMode -AvailabilityMode $availabilityMode -AsTemplate -Version $serverVersion


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates an in-memory representation of an availability replica. No changes are committed to the server. This replica should be passed to the AvailabilityReplica parameter of the New-SqlAvailabilityGroup cmdlet. This replica will use the endpoint located at the specified URL to communicate with other replicas in the availability group. This replica supports manual failover and the asynchronous-commit availability mode. The -AsTemplate and -Version parameters are required to construct the in-memory representation. The -Version parameter specifies the version of the server instance that will host this replica. The version number must be 11.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 3 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$agPath = "SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg"
$endpointURL = "TCP://PrimaryServerName.domain.com:5022"
$failoverMode = "Manual"
$availabilityMode = "AsynchronousCommit"
$secondaryReadMode = "AllowAllConnections"
New-SqlAvailabilityReplica -Name SecondaryServer\Instance -EndpointUrl $endpointURL -FailoverMode $failoverMode -AvailabilityMode $availabilityMode -ConnectionModeInSecondaryRole $secondaryReadMode -Path $agPath


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This example adds an availability replica to an existing availability group named 'MyAg'. This replica supports manual failover and asynchronous-commit availability mode. In the secondary role, this replica will support read access connections, allowing you to offload read-only processing to this replica.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Specifying the Endpoint URL for an Availability Replica (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlBackupEncryptionOption</command:name><maml:description><maml:para>Defines the encryption options for the Backup-SqlDatabase cmdlet or the Set-SqlSmartAdmin cmdlet.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlBackupEncryptionOption</command:noun><dev:version /></command:details><maml:description><maml:para></maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlBackupEncryptionOption</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Algorithm</maml:name><maml:description><maml:para>The encryption algorithm. Possible values are: AES128, AES192, AES256, and TripleDes.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionAlgorithm</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptorName</maml:name><maml:description><maml:para>The name of the server certificate or server asymmetric key.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptorType</maml:name><maml:description><maml:para>The encryptor type. Possible values are ServerCertificate and ServerAsymmetricKey.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptorType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoEncryption</maml:name><maml:description><maml:para>Specifies that encryption is disabled. This parameter cannot be used with any other parameters.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Algorithm</maml:name><maml:description><maml:para>The encryption algorithm. Possible values are: AES128, AES192, AES256, and TripleDes.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionAlgorithm</command:parameterValue><dev:type><maml:name>BackupEncryptionAlgorithm</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptorName</maml:name><maml:description><maml:para>The name of the server certificate or server asymmetric key.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptorType</maml:name><maml:description><maml:para>The encryptor type. Possible values are ServerCertificate and ServerAsymmetricKey.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptorType</command:parameterValue><dev:type><maml:name>BackupEncryptorType</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoEncryption</maml:name><maml:description><maml:para>Specifies that encryption is disabled. This parameter cannot be used with any other parameters.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.BackupEncryptionOptions</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>Used as input to the –EncryptionOption parameter for Backup-SqlDatabase and for Set-SqlSmartAdmin.</maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>  
-------------------------- EXAMPLE 1 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$encryptionOption = New-SqlBackupEncryptionOption -Algorithm Aes256 -EncryptorType ServerCertificate -EncryptorName "BackupCert"
</dev:code><dev:code>C:\PS&gt;Backup-SqlDatabase -ServerInstance . -Database "db1" -BackupFile "db1.bak" -CompressionOption On -EncryptionOption $encryptionOption

</dev:code><dev:remarks><maml:para>This example creates the encryption options and uses it as a parameter value in Backup-SqlDatabase to create an encrypted backup.</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlCredential</command:name><maml:description><maml:para>Creates a new SQL Server Credential Object.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlCredential</command:noun><dev:version /></command:details><maml:description><maml:para>The New-SqlCredential cmdlet creates a new SQL Server Credential object. A SQL Server Credential object is used to store authentication information. The SQL Server credential is required when backing up to or restoring from the Windows Azure storage service, and is used to store the Windows Azure storage account name and access key information.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>Name of the credential.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path of the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter uses the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ProviderName</maml:name><maml:description><maml:para>Cryptographic provider name.  Specifies the name of an Enterprise Key Management Provider (EKM).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>Password for the user or account. For Windows Azure storage service authentication, this is the storage account access key value.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>The name of user or account. For Windows Azure storage service authentication, this is the name of the Windows Azure storage account.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>Name of the credential.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object where the credential should be created.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ProviderName</maml:name><maml:description><maml:para>Cryptographic provider name.  Specifies the name of an Enterprise Key Management Provider (EKM).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>Password for the user or account. For Windows Azure storage service authentication, this is the storage account access key value.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>The name of user or account. For Windows Azure storage service authentication, this is the name of the Windows Azure storage account.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>The name of user or account. For Windows Azure storage service authentication, this is the name of the Windows Azure storage account.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object where the credential should be created.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>Name of the credential.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path of the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter uses the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ProviderName</maml:name><maml:description><maml:para>Cryptographic provider name.  Specifies the name of an Enterprise Key Management Provider (EKM).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>Password for the user or account. For Windows Azure storage service authentication, this is the storage account access key value.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue><dev:type><maml:name>SecureString</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>

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


                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt; cd SQLServer:\SQL\Computer\Instance
$storageAccount = “myWindowsAzureStorageAccount”
$storageKey = “&lt;storage account access key value&gt;”
New-SqlCredential – name “mysqlcredential” –Identity $storageAccount –secret $storageKey


</dev:code><dev:remarks><maml:para>This command creates SQL Credential “mysqlcredential” in the current instance of SQL Server.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>

-------------------------- EXAMPLE 2 -------------------------- 


                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;#cd to computer level
cd sqlserver:\sql\computer
$storageAccount = “myWindowsAzureStorageAccount”
$storageKey = “&lt;storage account access key value&gt;”
$secureString = convertto-securestring $storageKey  -asplaintext -force
# get the list of instances
$instances = Get-childitem
#pipe the instances to new-sqlcredentail cmdlet to create SQL credential
$instances | new-sqlcredential -Name “mysqlcredential”  -Identity storageAccount -Secret $secureString



</dev:code><dev:remarks><maml:para>This command creates a SQL Credential “mysqlcredential” on all the instances of SQL Server.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>New-SqlHADREndpoint</command:name><maml:description><maml:para>Creates a database mirroring endpoint on an instance of SQL Server.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>New</command:verb><command:noun>SqlHADREndpoint</command:noun><dev:version /></command:details><maml:description><maml:para>The New-SqlHadrndpoint cmdlet creates a database mirroring endpoint on the specified instance of SQL Server. This endpoint is required on every server instance that hosts an availability replica for any availability group. Each server instance can only have one database mirroring endpoint. If a server instance already possesses a database mirroring endpoint, use the existing endpoint.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>New-SqlHADREndpoint</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the endpoint to be created. This is a mandatory parameter.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server where the endpoint is to be created. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>The order and type of authentication that is used by the endpoint. The options are Certificate, CertificateKerberos , CertificateNegotiate, CertificateNtlm, Kerberos, KerberosCertificate, Negotiate, NegotiateCertificate, Ntlm, and NtlmCertificate. If the specified option calls for a certificate, the -Certificate parameter must also be set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>The name of the certificate the endpoint should use to authenticate connections. 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="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>The encryption option for the endpoint. The options are Disabled, Supported, or Required. Required is the default value.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>The form of encryption used by the endpoint. The options are Aes, AesRC4, None, RC4, and RC4Aes. By default the endpoint will use Aes encryption.
</maml:para><maml:para>NOTE:  The RC4 algorithm is only supported for backward compatibility. New material can only be encrypted using RC4 or RC4_128 when the database is in compatibility level 90 or 100. (Not recommended.) Use a newer algorithm such as one of the AES algorithms instead.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>The IP address that the endpoint will listen on. The default is ALL, which indicates that the listener will accept a connection on any valid IP address.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>The login of the owner of the endpoint. By default, this is the current login.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>The TCP port on which the endpoint will listen on for connections. The default port is 5022.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>New-SqlHADREndpoint</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the endpoint to be created. This is a mandatory parameter.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object of the instance of SQL Server where the endpoint should be created.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>The order and type of authentication that is used by the endpoint. The options are Certificate, CertificateKerberos , CertificateNegotiate, CertificateNtlm, Kerberos, KerberosCertificate, Negotiate, NegotiateCertificate, Ntlm, and NtlmCertificate. If the specified option calls for a certificate, the -Certificate parameter must also be set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>The name of the certificate the endpoint should use to authenticate connections. 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="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>The encryption option for the endpoint. The options are Disabled, Supported, or Required. Required is the default value.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>The form of encryption used by the endpoint. The options are Aes, AesRC4, None, RC4, and RC4Aes. By default the endpoint will use Aes encryption.
</maml:para><maml:para>NOTE:  The RC4 algorithm is only supported for backward compatibility. New material can only be encrypted using RC4 or RC4_128 when the database is in compatibility level 90 or 100. (Not recommended.) Use a newer algorithm such as one of the AES algorithms instead.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>The IP address that the endpoint will listen on. The default is ALL, which indicates that the listener will accept a connection on any valid IP address.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>The login of the owner of the endpoint. By default, this is the current login.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>The TCP port on which the endpoint will listen on for connections. The default port is 5022.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>The order and type of authentication that is used by the endpoint. The options are Certificate, CertificateKerberos , CertificateNegotiate, CertificateNtlm, Kerberos, KerberosCertificate, Negotiate, NegotiateCertificate, Ntlm, and NtlmCertificate. If the specified option calls for a certificate, the -Certificate parameter must also be set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue><dev:type><maml:name>EndpointAuthenticationOrder</maml:name><maml:uri /></dev:type><dev:defaultValue>SMO.EndpointAuthenticationOrder.Negotiate</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>The name of the certificate the endpoint should use to authenticate connections. 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="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>The encryption option for the endpoint. The options are Disabled, Supported, or Required. Required is the default value.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue><dev:type><maml:name>EndpointEncryption</maml:name><maml:uri /></dev:type><dev:defaultValue>SMO.EndpointAuthentication.Required</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>The form of encryption used by the endpoint. The options are Aes, AesRC4, None, RC4, and RC4Aes. By default the endpoint will use Aes encryption.
</maml:para><maml:para>NOTE:  The RC4 algorithm is only supported for backward compatibility. New material can only be encrypted using RC4 or RC4_128 when the database is in compatibility level 90 or 100. (Not recommended.) Use a newer algorithm such as one of the AES algorithms instead.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue><dev:type><maml:name>EndpointEncryptionAlgorithm</maml:name><maml:uri /></dev:type><dev:defaultValue>RC4</dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="3" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object of the instance of SQL Server where the endpoint should be created.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Context</command:parameterValue><dev:type><maml:name>Context</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>The IP address that the endpoint will listen on. The default is ALL, which indicates that the listener will accept a connection on any valid IP address.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue><dev:type><maml:name>IPAddress</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Name</maml:name><maml:description><maml:para>The name of the endpoint to be created. This is a mandatory parameter.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>The login of the owner of the endpoint. By default, this is the current login.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server where the endpoint is to be created. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>The TCP port on which the endpoint will listen on for connections. The default port is 5022.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue>5022</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>SMO.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>

This parameter specifies the server instance on which the endpoint is to be created.


</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>SMO.Endpoint</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> 
 
-------------------------- EXAMPLE 1 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlHADREndpoint -Path SQLSERVER:\Sql\Computer\Instance -Name MyEndpoint


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates a database mirroring endpoint named 'MyEndpoint' on the server instance located at the specified path. This endpoint uses the default port, 5022.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 2 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlHADREndpoint -Path SQLSERVER:\Sql\Computer\Instance -Name EndpointName -Port 4022 -EncryptionAlgorithm 'Aes' -Encryption 'Required'


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates a database mirroring endpoint named 'MyEndpoint' on the server instance located at the specified path. This endpoint listens on point 4022. The endpoint uses the AES algorithm for encryption and requires that connections use encryption.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 3 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlHADREndpoint -Path SQLSERVER:\Sql\Computer\Instance -Name EndpointName -AuthenticationOrder 'Certificate' -Certificate 'MyCertificate'


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command creates a database mirroring endpoint named 'MyEndpoint' on the server instance located at the specified path. This endpoint uses the certificate named 'MyCertificate' to authenticate connections.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 4 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;New-SqlHADREndpoint -Path SQLSERVER:\Sql\Computer\Instance -Name MyEndpoint -Script


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command outputs the Transact-SQL script that creates a database mirroring endpoint named 'MyEndpoint' on the server instance located at the specified path. The endpoint is not actually created by this command.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Remove-SqlAvailabilityDatabase</command:name><maml:description><maml:para>Removes the availability database specified by the InputObject or Path parameter from its availability group.   </maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Remove</command:verb><command:noun>SqlAvailabilityDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>The Remove-SqlAvailabilityDatabase cmdlet removes the availability database specified by the InputObject or Path parameter from its availability group. If executed at the server instance that hosts the primary replica, this cmdlet removes the primary database and all corresponding secondary databases from the availability group. If executed at a server instance that hosts a secondary replica, this cmdlet removes only the local secondary database from the availability group; this secondary database is no longer joined to the availability group, but other copies of the database continue to be joined.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-SqlAvailabilityDatabase</maml:name><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path of the availability database. This is a mandatory parameter.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlAvailabilityDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityDatabase object of the availability database to remove.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityDatabase object of the availability database to remove.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path of the availability database. This is a mandatory parameter.
</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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityDatabase</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>

Specifies the availability database to be removed.


</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> 
 
-------------------------- EXAMPLE 1 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Remove-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\PrimaryComputer\InstanceName\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command removes the availability database 'MyDatabase' from the availability group named 'MyAg'. Because the command is executed on the server instance that hosts the primary replica, the primary database and all its corresponding secondary databases are removed from the availability group. Data synchronization will no longer occur for this database on any secondary replica.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 2 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\Sql\PrimaryComputer\InstanceName\AvailabilityGroups\MyAg\AvailabilityDatabases | Remove-SqlAvailabilityDatabase


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command removes all availability databases from the availability group named 'MyAg'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 3 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Remove-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\SecondaryComputer\InstanceName\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command removes the secondary database 'MyDatabase' from the secondary replica hosted by the server instance named 'SecondaryComputer\Instance'. Data synchronization to the removed secondary databases ceases. This command does not affect the primary database or any other secondary databases.
</maml:para><maml:para>Note:  To restart data synchronization on this secondary database, rejoin it to the availability group by using the Add-SqlAvailabilityDatabase cmdlet on the same server instance.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 4 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Remove-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\PrimaryComputer\InstanceName\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase -Script


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command outputs the Transact-SQL command that removes the availability database 'MyDatabase' from the availability group 'MyAg'. The availability database is not actually removed by this command.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Remove-SqlAvailabilityGroup</command:name><maml:description><maml:para>Removes the availability group specified by the InputObject or Path parameter.







                    </maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Remove</command:verb><command:noun>SqlAvailabilityGroup</command:noun><dev:version /></command:details><maml:description><maml:para>The Remove-SqlAvailabilityGroup cmdlet removes the availability group specified by the InputObject or Path parameter. This cmdlet can remove availability groups that have been partially created. The cmdlet can be executed on any instance of SQL Server that has been enabled for AlwaysOn Availability Groups on a WSFC node that possess the correct security credentials for the availability group. Errors are thrown if the instance on which this cmdlet is executed is not enabled for AlwaysOn Availability Groups or if the availability group specified by the Path parameter does not exist.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group. This is a mandatory parameter.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityGroup object of the availability group to be removed.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityGroup object of the availability group to be removed.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group. This is a mandatory parameter.
</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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>



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



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Remove-SqlAvailabilityGroup -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command removes the availability group named 'MyAg'. This command can be executed on any server instance that hosts an availability replica for the availability group.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 2 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups | Remove-SqlAvailabilityGroup


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command removes all availability groups with availability replicas that are hosted by the server instance named 'Computer\Instance'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 3 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Remove-SqlAvailabilityGroup -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg -Script


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command outputs the Transact-SQL script that removes the availability group named 'MyAg'. The availability group is not actually removed by this command.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: DROP AVAILABILITY GROUP (Transact-SQL)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Remove-SqlAvailabilityReplica</command:name><maml:description><maml:para>Removes the secondary availability replica specified by the InputObject or Path parameter. </maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Remove</command:verb><command:noun>SqlAvailabilityReplica</command:noun><dev:version /></command:details><maml:description><maml:para>The Remove-SqlAvailabilityGroup cmdlet removes the secondary replica specified by the InputObject or Path parameter. This cmdlet can be executed only at the server instance that hosts the primary replica.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability replica. This is a mandatory parameter.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityReplica object of the replica that should be removed.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityReplica object of the replica that should be removed.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability replica. This is a mandatory parameter.
</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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityReplica</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>

The availability replica to be removed.


</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> 
 
-------------------------- EXAMPLE 1 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Remove-SqlAvailabilityReplica -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command removes the availability replica named 'MyReplica' from the availability group named 'MyAg'.  This command must be run on the server instance that hosts the primary replica of the availability group.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 2 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Remove-SqlAvailabilityReplica -Path SQLSERVER:\SQL\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica -Script


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command outputs the Transact-SQL script that removes the availability replica named 'MyReplica' from the availability group named 'MyAg'.  The replica is not actually removed by this command.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Deleting an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Remove-SqlCredential</command:name><maml:description><maml:para>Deletes the SQL Credential Object.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Remove</command:verb><command:noun>SqlCredential</command:noun><dev:version /></command:details><maml:description><maml:para>The Remove-SqlCredential cmdlet deletes a SQL Server credential object. This cmdlet supports the following two modes of operation:

1. By specifying the path or location of the credential including the credential name using the –path parameter.

2. By passing a Smo.Credential object to the object using the –InputObject parameter.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-SqlCredential</maml:name><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path of the Credential on which you want to perform this operation. Ex: SQLSERVER:\SQL\Computer\Instance\Credentials\Credential
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>An input credential object. This object can retrieved using the Get-SqlCredential cmdlet.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>An input credential object. This object can retrieved using the Get-SqlCredential cmdlet.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path of the Credential on which you want to perform this operation. Ex: SQLSERVER:\SQL\Computer\Instance\Credentials\Credential
</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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>

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


                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;Remove-SqlCredential -Path SQLSERVER:\SQL\Computer\Instance\Credentials\MySqlCredential


</dev:code><dev:remarks><maml:para>This command deletes the SQL Credential ‘MySqlCredential’ using the path specified in the –path parameter.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>

-------------------------- EXAMPLE 2 -------------------------- 


                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;The command retrieves the credential object from the Get-Credential cmdlet and then pipes it to the Remove-Sql Credential cmdlet to delete the SQL Credential ‘MySqlCredential’.
PS C:\&gt;$cred = Get-SqlCredential -Name MySqlCredential
$cred | Remove-SqlCredential


</dev:code><dev:remarks></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Remove-SqlFirewallRule</command:name><maml:description><maml:para>Disables the Windows Firewall rule that allows connections to a specific instance of SQL Server.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Remove</command:verb><command:noun>SqlFirewallRule</command:noun><dev:version /></command:details><maml:description><maml:para>Disables the Windows Firewall rule that allows connections to a specific instance of SQL Server.</maml:para><maml:para>SQL Server Cloud Adapter must be running and accessible on the computer that hosts the instance of SQL Server.</maml:para><maml:para>This cmdlet supports the following modes of operation:</maml:para><maml:para>1. By specifying the instance PowerShell path.</maml:para><maml:para>2. By specifying the server object.</maml:para><maml:para>3. By specifying the ServerInstance of the target instance of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Remove-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The server object of the target instance.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Remove-SqlFirewallRule</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>This parameter specifies the name of an instance of SQL Server that becomes the target of the operation.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The server object of the target instance.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter defaults to the current working 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>This parameter specifies the name of an instance of SQL Server that becomes the target of the operation.</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" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;CD SQLSERVER:\SQL\Computer\Instance;
Remove-SqlFirewallRule -Credential $credential -AcceptSelfSignedCertificate;

</dev:code><dev:remarks><maml:para>This command disables the Windows Firewall rule on machine ‘Computer’ to block connections to the SQL Server instance ‘Instance’ on this machine. The current working directory is used to determine the server instance where the operation should occur. The self-signed certificate of the target machine will be automatically accepted without prompting the user.</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and disables the Windows Firewall rules to block connections to each one of them. The self-signed certificate of the target machine will be automatically accepted without prompting the user.
PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName "MachineName"  | Remove-SqlFirewallRule -Credential $credential -AcceptSelfSignedCertificate;

</dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Restore-SqlDatabase</command:name><maml:description><maml:para>Restores all or part of a database or the backups of transaction log records.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Restore</command:verb><command:noun>SqlDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>The Restore-SqlDatabase cmdlet performs restore operations on a SQL Server database. This includes full database restores, transaction log restores, and database file restores. This cmdlet is modeled after the Microsoft.SqlServer.Management.Smo.Restore class. The parameters on this class generally correspond to properties on that Smo object.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Restore-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>The name of the database to be restored. Cannot be used with the -DatabaseObject parameter.
</maml:para><maml:para>When the -Database parameter is used, then the -Path, -InputObject, or -ServerInstance parameter must also be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>The location or locations where the backup files are stored. This is an optional parameter. If not specified, the default backup location of the server is searched for the name "databasename.trn" for log restores, or "databasename.bak" for all other types of restores. This parameter cannot be used with the BackupDevice parameter. If you are backing to the Windows Azure Blob storage service (URL), this parameter or BackupDevice parameter is required.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>The devices where the backups are be stored. This parameter cannot be used with the BackupFile parameter. Use this parameter if you are backing up to a tape device..
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>The physical block size for the backup, in bytes. The supported sizes are 512, 1024, 2048, 4096, 8192, 16384, 32768, and 65536 (64 KB) bytes. The default is 65536 for tape devices and 512 otherwise.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>The total number of I/O buffers to be used for the backup operation. You can specify any positive integer. Using many buffers could cause "out of memory" errors because of insufficient virtual address space in the Sqlservr.exe process.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>Calculates a checksum value during the restore operation. If not set, no checksum is calculated.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ClearSuspectPageTable</maml:name><maml:description><maml:para>Deletes the suspect page table following the restore operation. If not set, no action will be taken towards the suspect page table.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>The operation continues when a checksum error occurs. When not set, the operation will fail after a checksum error.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>The database files targeted by the restore operation. Only used when the RestoreAction property is set to Files. When the RestoreAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>The database file groups targeted by the restore operation. Only used when the RestoreAction property is set to File. When the RestoreAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FileNumber</maml:name><maml:description><maml:para>The index number that is used to identify the targeted backup set on the backup medium.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>KeepReplication</maml:name><maml:description><maml:para>Preserves the replication configuration. If not set, the replication configuration is ignored by the restore operation.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>The maximum number of bytes to be transferred between the backup media and the instance of SQL Server. The possible values are multiples of 65536 bytes (64 KB), up to 4194304 bytes (4 MB).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>The name that is used to identify a particular media set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>The database is restored into the restoring state. Roll back does not occur. Additional backups can be restored.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>Leaves a tape drive open at the ending position when the restore is completed. If not set, the tape is rewound after the operation is completed. Does not apply to disk restores.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Offset</maml:name><maml:description><maml:para>The page addresses to be restored. Only relevant when -RestoreAction is set to OnlinePage.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int64[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Partial</maml:name><maml:description><maml:para>The restore operation is a partial restore.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>Outputs the Smo Backup object used to perform the backup operation.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path of the instance of SQL Server on which you want to execute the restore operation. This is an optional parameter. If not specified, the value of this parameter uses the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RelocateFile</maml:name><maml:description><maml:para>A list of Smo.Relocate file objects. Each object consists of a logical backup file name and a physical file system location. The restore moves the restored database into the specified physical location on the target server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">RelocateFile[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReplaceDatabase</maml:name><maml:description><maml:para>Creates a new image of the database. Overwrites any existing database with the same name. When not set, the restore operation will fail if a database with that name already exists.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>Continues processing a partially completed restore operation. If not set (default), the cmdlet restarts an interrupted restore operation at the beginning of the backup set.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestoreAction</maml:name><maml:description><maml:para>The type of restore operation that should be performed. Valid options are Database, Files, Log, OnlinePage, OnlineFiles.
</maml:para><maml:para>Database: Restore the database.
</maml:para><maml:para>Files: Restore one or more data files. This requires the DatabaseFile or DatabaseFileGroup parameter to be set.
</maml:para><maml:para>Log: Restore the transaction log.
</maml:para><maml:para>OnlinePage: Restore a data page online while the database is still available to other users.
</maml:para><maml:para>OnlineFiles: Restore one or more data files while the database is still available to other users. This requires the DatabaseFile or DatabaseFileGroup parameter to be set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">RestoreActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestrictedUser</maml:name><maml:description><maml:para>Restricts database access to the restored database to the db_owner fixed database role, and the dbcreator and sysadmin fixed server roles.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server Credential that stores authentication information to authenticate to the Windows Azure Blob storage service. The authentication information stored includes Windows Azure storage account name and the associated access key values. This is a required parameter when restoring from the Windows Azure Blob storage service (URL). This parameter is not used with Disk or Tape.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StandbyFile</maml:name><maml:description><maml:para>The name of an undo file that is used as part of the imaging strategy for an instance of SQL Server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkAfterDate</maml:name><maml:description><maml:para>Specifies the date to be used in conjunction with the mark name specified by the StopAtMarkName parameter to determine the stopping point of the recovery operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkName</maml:name><maml:description><maml:para>Stops the recovery after a marked transaction. Used with the StopAtMarkAfterDate parameter to determine the stopping point of the recovery operation. Recovery includes the transaction that contains the mark. If the StopAtMarkAfterDate value is not set, recovery stops at the first mark with the specified name.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkAfterDate</maml:name><maml:description><maml:para>Specifies the date to be used in conjunction with StopBeforeMarkName to determine the stopping point of the recovery operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkName</maml:name><maml:description><maml:para>Stops the recovery before a marked transaction. Used with the StopBeforeMarkAfterDate to determine the stopping point of the recovery operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ToPointInTime</maml:name><maml:description><maml:para>The endpoint for database log restoration. Only applies when the -RestoreAction parameter is set to Log.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>The tape device is rewound and unloaded when the operation is completed. When not set, no attempt is made to rewind and unload the tape medium. Does not apply to disk backups.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Restore-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>The name of the database to be restored. Cannot be used with the -DatabaseObject parameter.
</maml:para><maml:para>When the -Database parameter is used, then the -Path, -InputObject, or -ServerInstance parameter must also be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>The location or locations where the backup files are stored. This is an optional parameter. If not specified, the default backup location of the server is searched for the name "databasename.trn" for log restores, or "databasename.bak" for all other types of restores. This parameter cannot be used with the BackupDevice parameter. If you are backing to the Windows Azure Blob storage service (URL), this parameter or BackupDevice parameter is required.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>The devices where the backups are be stored. This parameter cannot be used with the BackupFile parameter. Use this parameter if you are backing up to a tape device..
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>The physical block size for the backup, in bytes. The supported sizes are 512, 1024, 2048, 4096, 8192, 16384, 32768, and 65536 (64 KB) bytes. The default is 65536 for tape devices and 512 otherwise.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>The total number of I/O buffers to be used for the backup operation. You can specify any positive integer. Using many buffers could cause "out of memory" errors because of insufficient virtual address space in the Sqlservr.exe process.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>Calculates a checksum value during the restore operation. If not set, no checksum is calculated.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ClearSuspectPageTable</maml:name><maml:description><maml:para>Deletes the suspect page table following the restore operation. If not set, no action will be taken towards the suspect page table.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>The number of seconds to wait for a server connection before  a time-out failure. The time-out value must be an integer between 0 and 65534. If 0 is specified, connection attempts do not time out.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>The operation continues when a checksum error occurs. When not set, the operation will fail after a checksum error.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>A PSCredential object specifying the credentials for a SQL Server login that has permission to perform this operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>The database files targeted by the restore operation. Only used when the RestoreAction property is set to Files. When the RestoreAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>The database file groups targeted by the restore operation. Only used when the RestoreAction property is set to File. When the RestoreAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FileNumber</maml:name><maml:description><maml:para>The index number that is used to identify the targeted backup set on the backup medium.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>KeepReplication</maml:name><maml:description><maml:para>Preserves the replication configuration. If not set, the replication configuration is ignored by the restore operation.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>The maximum number of bytes to be transferred between the backup media and the instance of SQL Server. The possible values are multiples of 65536 bytes (64 KB), up to 4194304 bytes (4 MB).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>The name that is used to identify a particular media set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>The database is restored into the restoring state. Roll back does not occur. Additional backups can be restored.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>Leaves a tape drive open at the ending position when the restore is completed. If not set, the tape is rewound after the operation is completed. Does not apply to disk restores.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Offset</maml:name><maml:description><maml:para>The page addresses to be restored. Only relevant when -RestoreAction is set to OnlinePage.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int64[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Partial</maml:name><maml:description><maml:para>The restore operation is a partial restore.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>Outputs the Smo Backup object used to perform the backup operation.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RelocateFile</maml:name><maml:description><maml:para>A list of Smo.Relocate file objects. Each object consists of a logical backup file name and a physical file system location. The restore moves the restored database into the specified physical location on the target server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">RelocateFile[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReplaceDatabase</maml:name><maml:description><maml:para>Creates a new image of the database. Overwrites any existing database with the same name. When not set, the restore operation will fail if a database with that name already exists.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>Continues processing a partially completed restore operation. If not set (default), the cmdlet restarts an interrupted restore operation at the beginning of the backup set.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestoreAction</maml:name><maml:description><maml:para>The type of restore operation that should be performed. Valid options are Database, Files, Log, OnlinePage, OnlineFiles.
</maml:para><maml:para>Database: Restore the database.
</maml:para><maml:para>Files: Restore one or more data files. This requires the DatabaseFile or DatabaseFileGroup parameter to be set.
</maml:para><maml:para>Log: Restore the transaction log.
</maml:para><maml:para>OnlinePage: Restore a data page online while the database is still available to other users.
</maml:para><maml:para>OnlineFiles: Restore one or more data files while the database is still available to other users. This requires the DatabaseFile or DatabaseFileGroup parameter to be set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">RestoreActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestrictedUser</maml:name><maml:description><maml:para>Restricts database access to the restored database to the db_owner fixed database role, and the dbcreator and sysadmin fixed server roles.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server Credential that stores authentication information to authenticate to the Windows Azure Blob storage service. The authentication information stored includes Windows Azure storage account name and the associated access key values. This is a required parameter when restoring from the Windows Azure Blob storage service (URL). This parameter is not used with Disk or Tape.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StandbyFile</maml:name><maml:description><maml:para>The name of an undo file that is used as part of the imaging strategy for an instance of SQL Server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkAfterDate</maml:name><maml:description><maml:para>Specifies the date to be used in conjunction with the mark name specified by the StopAtMarkName parameter to determine the stopping point of the recovery operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkName</maml:name><maml:description><maml:para>Stops the recovery after a marked transaction. Used with the StopAtMarkAfterDate parameter to determine the stopping point of the recovery operation. Recovery includes the transaction that contains the mark. If the StopAtMarkAfterDate value is not set, recovery stops at the first mark with the specified name.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkAfterDate</maml:name><maml:description><maml:para>Specifies the date to be used in conjunction with StopBeforeMarkName to determine the stopping point of the recovery operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkName</maml:name><maml:description><maml:para>Stops the recovery before a marked transaction. Used with the StopBeforeMarkAfterDate to determine the stopping point of the recovery operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ToPointInTime</maml:name><maml:description><maml:para>The endpoint for database log restoration. Only applies when the -RestoreAction parameter is set to Log.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>The tape device is rewound and unloaded when the operation is completed. When not set, no attempt is made to rewind and unload the tape medium. Does not apply to disk backups.
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>The name of an instance of SQL Server. This server instance becomes the target of the restore operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Restore-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>The name of the database to be restored. Cannot be used with the -DatabaseObject parameter.
</maml:para><maml:para>When the -Database parameter is used, then the -Path, -InputObject, or -ServerInstance parameter must also be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>The location or locations where the backup files are stored. This is an optional parameter. If not specified, the default backup location of the server is searched for the name "databasename.trn" for log restores, or "databasename.bak" for all other types of restores. This parameter cannot be used with the BackupDevice parameter. If you are backing to the Windows Azure Blob storage service (URL), this parameter or BackupDevice parameter is required.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>The devices where the backups are be stored. This parameter cannot be used with the BackupFile parameter. Use this parameter if you are backing up to a tape device..
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>The physical block size for the backup, in bytes. The supported sizes are 512, 1024, 2048, 4096, 8192, 16384, 32768, and 65536 (64 KB) bytes. The default is 65536 for tape devices and 512 otherwise.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>The total number of I/O buffers to be used for the backup operation. You can specify any positive integer. Using many buffers could cause "out of memory" errors because of insufficient virtual address space in the Sqlservr.exe process.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>Calculates a checksum value during the restore operation. If not set, no checksum is calculated.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ClearSuspectPageTable</maml:name><maml:description><maml:para>Deletes the suspect page table following the restore operation. If not set, no action will be taken towards the suspect page table.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>The operation continues when a checksum error occurs. When not set, the operation will fail after a checksum error.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>The database files targeted by the restore operation. Only used when the RestoreAction property is set to Files. When the RestoreAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>The database file groups targeted by the restore operation. Only used when the RestoreAction property is set to File. When the RestoreAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FileNumber</maml:name><maml:description><maml:para>The index number that is used to identify the targeted backup set on the backup medium.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>KeepReplication</maml:name><maml:description><maml:para>Preserves the replication configuration. If not set, the replication configuration is ignored by the restore operation.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>The maximum number of bytes to be transferred between the backup media and the instance of SQL Server. The possible values are multiples of 65536 bytes (64 KB), up to 4194304 bytes (4 MB).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>The name that is used to identify a particular media set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>The database is restored into the restoring state. Roll back does not occur. Additional backups can be restored.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>Leaves a tape drive open at the ending position when the restore is completed. If not set, the tape is rewound after the operation is completed. Does not apply to disk restores.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Offset</maml:name><maml:description><maml:para>The page addresses to be restored. Only relevant when -RestoreAction is set to OnlinePage.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int64[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Partial</maml:name><maml:description><maml:para>The restore operation is a partial restore.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>Outputs the Smo Backup object used to perform the backup operation.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RelocateFile</maml:name><maml:description><maml:para>A list of Smo.Relocate file objects. Each object consists of a logical backup file name and a physical file system location. The restore moves the restored database into the specified physical location on the target server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">RelocateFile[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReplaceDatabase</maml:name><maml:description><maml:para>Creates a new image of the database. Overwrites any existing database with the same name. When not set, the restore operation will fail if a database with that name already exists.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>Continues processing a partially completed restore operation. If not set (default), the cmdlet restarts an interrupted restore operation at the beginning of the backup set.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestoreAction</maml:name><maml:description><maml:para>The type of restore operation that should be performed. Valid options are Database, Files, Log, OnlinePage, OnlineFiles.
</maml:para><maml:para>Database: Restore the database.
</maml:para><maml:para>Files: Restore one or more data files. This requires the DatabaseFile or DatabaseFileGroup parameter to be set.
</maml:para><maml:para>Log: Restore the transaction log.
</maml:para><maml:para>OnlinePage: Restore a data page online while the database is still available to other users.
</maml:para><maml:para>OnlineFiles: Restore one or more data files while the database is still available to other users. This requires the DatabaseFile or DatabaseFileGroup parameter to be set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">RestoreActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestrictedUser</maml:name><maml:description><maml:para>Restricts database access to the restored database to the db_owner fixed database role, and the dbcreator and sysadmin fixed server roles.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server Credential that stores authentication information to authenticate to the Windows Azure Blob storage service. The authentication information stored includes Windows Azure storage account name and the associated access key values. This is a required parameter when restoring from the Windows Azure Blob storage service (URL). This parameter is not used with Disk or Tape.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StandbyFile</maml:name><maml:description><maml:para>The name of an undo file that is used as part of the imaging strategy for an instance of SQL Server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkAfterDate</maml:name><maml:description><maml:para>Specifies the date to be used in conjunction with the mark name specified by the StopAtMarkName parameter to determine the stopping point of the recovery operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkName</maml:name><maml:description><maml:para>Stops the recovery after a marked transaction. Used with the StopAtMarkAfterDate parameter to determine the stopping point of the recovery operation. Recovery includes the transaction that contains the mark. If the StopAtMarkAfterDate value is not set, recovery stops at the first mark with the specified name.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkAfterDate</maml:name><maml:description><maml:para>Specifies the date to be used in conjunction with StopBeforeMarkName to determine the stopping point of the recovery operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkName</maml:name><maml:description><maml:para>Stops the recovery before a marked transaction. Used with the StopBeforeMarkAfterDate to determine the stopping point of the recovery operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ToPointInTime</maml:name><maml:description><maml:para>The endpoint for database log restoration. Only applies when the -RestoreAction parameter is set to Log.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>The tape device is rewound and unloaded when the operation is completed. When not set, no attempt is made to rewind and unload the tape medium. Does not apply to disk backups.
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object of instance of SQL Server where the restore should occur.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Restore-SqlDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>DatabaseObject</maml:name><maml:description><maml:para>A database object. The restore operation will restore the backup to this database.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Database</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>The location or locations where the backup files are stored. This is an optional parameter. If not specified, the default backup location of the server is searched for the name "databasename.trn" for log restores, or "databasename.bak" for all other types of restores. This parameter cannot be used with the BackupDevice parameter. If you are backing to the Windows Azure Blob storage service (URL), this parameter or BackupDevice parameter is required.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>The devices where the backups are be stored. This parameter cannot be used with the BackupFile parameter. Use this parameter if you are backing up to a tape device..
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>The physical block size for the backup, in bytes. The supported sizes are 512, 1024, 2048, 4096, 8192, 16384, 32768, and 65536 (64 KB) bytes. The default is 65536 for tape devices and 512 otherwise.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>The total number of I/O buffers to be used for the backup operation. You can specify any positive integer. Using many buffers could cause "out of memory" errors because of insufficient virtual address space in the Sqlservr.exe process.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>Calculates a checksum value during the restore operation. If not set, no checksum is calculated.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ClearSuspectPageTable</maml:name><maml:description><maml:para>Deletes the suspect page table following the restore operation. If not set, no action will be taken towards the suspect page table.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>The operation continues when a checksum error occurs. When not set, the operation will fail after a checksum error.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>The database files targeted by the restore operation. Only used when the RestoreAction property is set to Files. When the RestoreAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>The database file groups targeted by the restore operation. Only used when the RestoreAction property is set to File. When the RestoreAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FileNumber</maml:name><maml:description><maml:para>The index number that is used to identify the targeted backup set on the backup medium.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>KeepReplication</maml:name><maml:description><maml:para>Preserves the replication configuration. If not set, the replication configuration is ignored by the restore operation.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>The maximum number of bytes to be transferred between the backup media and the instance of SQL Server. The possible values are multiples of 65536 bytes (64 KB), up to 4194304 bytes (4 MB).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>The name that is used to identify a particular media set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>The database is restored into the restoring state. Roll back does not occur. Additional backups can be restored.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>Leaves a tape drive open at the ending position when the restore is completed. If not set, the tape is rewound after the operation is completed. Does not apply to disk restores.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Offset</maml:name><maml:description><maml:para>The page addresses to be restored. Only relevant when -RestoreAction is set to OnlinePage.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int64[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Partial</maml:name><maml:description><maml:para>The restore operation is a partial restore.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>Outputs the Smo Backup object used to perform the backup operation.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RelocateFile</maml:name><maml:description><maml:para>A list of Smo.Relocate file objects. Each object consists of a logical backup file name and a physical file system location. The restore moves the restored database into the specified physical location on the target server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">RelocateFile[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReplaceDatabase</maml:name><maml:description><maml:para>Creates a new image of the database. Overwrites any existing database with the same name. When not set, the restore operation will fail if a database with that name already exists.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>Continues processing a partially completed restore operation. If not set (default), the cmdlet restarts an interrupted restore operation at the beginning of the backup set.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestoreAction</maml:name><maml:description><maml:para>The type of restore operation that should be performed. Valid options are Database, Files, Log, OnlinePage, OnlineFiles.
</maml:para><maml:para>Database: Restore the database.
</maml:para><maml:para>Files: Restore one or more data files. This requires the DatabaseFile or DatabaseFileGroup parameter to be set.
</maml:para><maml:para>Log: Restore the transaction log.
</maml:para><maml:para>OnlinePage: Restore a data page online while the database is still available to other users.
</maml:para><maml:para>OnlineFiles: Restore one or more data files while the database is still available to other users. This requires the DatabaseFile or DatabaseFileGroup parameter to be set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">RestoreActionType</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestrictedUser</maml:name><maml:description><maml:para>Restricts database access to the restored database to the db_owner fixed database role, and the dbcreator and sysadmin fixed server roles.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server Credential that stores authentication information to authenticate to the Windows Azure Blob storage service. The authentication information stored includes Windows Azure storage account name and the associated access key values. This is a required parameter when restoring from the Windows Azure Blob storage service (URL). This parameter is not used with Disk or Tape.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StandbyFile</maml:name><maml:description><maml:para>The name of an undo file that is used as part of the imaging strategy for an instance of SQL Server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkAfterDate</maml:name><maml:description><maml:para>Specifies the date to be used in conjunction with the mark name specified by the StopAtMarkName parameter to determine the stopping point of the recovery operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkName</maml:name><maml:description><maml:para>Stops the recovery after a marked transaction. Used with the StopAtMarkAfterDate parameter to determine the stopping point of the recovery operation. Recovery includes the transaction that contains the mark. If the StopAtMarkAfterDate value is not set, recovery stops at the first mark with the specified name.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkAfterDate</maml:name><maml:description><maml:para>Specifies the date to be used in conjunction with StopBeforeMarkName to determine the stopping point of the recovery operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkName</maml:name><maml:description><maml:para>Stops the recovery before a marked transaction. Used with the StopBeforeMarkAfterDate to determine the stopping point of the recovery operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ToPointInTime</maml:name><maml:description><maml:para>The endpoint for database log restoration. Only applies when the -RestoreAction parameter is set to Log.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>The tape device is rewound and unloaded when the operation is completed. When not set, no attempt is made to rewind and unload the tape medium. Does not apply to disk backups.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupDevice</maml:name><maml:description><maml:para>The devices where the backups are be stored. This parameter cannot be used with the BackupFile parameter. Use this parameter if you are backing up to a tape device..
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">BackupDeviceItem[]</command:parameterValue><dev:type><maml:name>BackupDeviceItem[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>BackupFile</maml:name><maml:description><maml:para>The location or locations where the backup files are stored. This is an optional parameter. If not specified, the default backup location of the server is searched for the name "databasename.trn" for log restores, or "databasename.bak" for all other types of restores. This parameter cannot be used with the BackupDevice parameter. If you are backing to the Windows Azure Blob storage service (URL), this parameter or BackupDevice parameter 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BlockSize</maml:name><maml:description><maml:para>The physical block size for the backup, in bytes. The supported sizes are 512, 1024, 2048, 4096, 8192, 16384, 32768, and 65536 (64 KB) bytes. The default is 65536 for tape devices and 512 otherwise.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BufferCount</maml:name><maml:description><maml:para>The total number of I/O buffers to be used for the backup operation. You can specify any positive integer. Using many buffers could cause "out of memory" errors because of insufficient virtual address space in the Sqlservr.exe process.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Checksum</maml:name><maml:description><maml:para>Calculates a checksum value during the restore operation. If not set, no checksum is calculated.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ClearSuspectPageTable</maml:name><maml:description><maml:para>Deletes the suspect page table following the restore operation. If not set, no action will be taken towards the suspect page table.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionTimeout</maml:name><maml:description><maml:para>The number of seconds to wait for a server connection before  a time-out failure. The time-out value must be an integer between 0 and 65534. If 0 is specified, connection attempts do not time out.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ContinueAfterError</maml:name><maml:description><maml:para>The operation continues when a checksum error occurs. When not set, the operation will fail after a checksum error.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>A PSCredential object specifying the credentials for a SQL Server login that has permission to perform this operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Database</maml:name><maml:description><maml:para>The name of the database to be restored. Cannot be used with the -DatabaseObject parameter.
</maml:para><maml:para>When the -Database parameter is used, then the -Path, -InputObject, or -ServerInstance parameter must also be specified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFile</maml:name><maml:description><maml:para>The database files targeted by the restore operation. Only used when the RestoreAction property is set to Files. When the RestoreAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</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" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>DatabaseFileGroup</maml:name><maml:description><maml:para>The database file groups targeted by the restore operation. Only used when the RestoreAction property is set to File. When the RestoreAction parameter is set to Files, either the DatabaseFileGroups property or the DatabaseFiles property must be specified.
</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" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>DatabaseObject</maml:name><maml:description><maml:para>A database object. The restore operation will restore the backup to this database.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Database</command:parameterValue><dev:type><maml:name>Database</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FileNumber</maml:name><maml:description><maml:para>The index number that is used to identify the targeted backup set on the backup medium.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Server object of instance of SQL Server where the restore should occur.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>KeepReplication</maml:name><maml:description><maml:para>Preserves the replication configuration. If not set, the replication configuration is ignored by the restore operation.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MaxTransferSize</maml:name><maml:description><maml:para>The maximum number of bytes to be transferred between the backup media and the instance of SQL Server. The possible values are multiples of 65536 bytes (64 KB), up to 4194304 bytes (4 MB).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MediaName</maml:name><maml:description><maml:para>The name that is used to identify a particular media set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRecovery</maml:name><maml:description><maml:para>The database is restored into the restoring state. Roll back does not occur. Additional backups can be restored.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRewind</maml:name><maml:description><maml:para>Leaves a tape drive open at the ending position when the restore is completed. If not set, the tape is rewound after the operation is completed. Does not apply to disk restores.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Offset</maml:name><maml:description><maml:para>The page addresses to be restored. Only relevant when -RestoreAction is set to OnlinePage.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Int64[]</command:parameterValue><dev:type><maml:name>Int64[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Partial</maml:name><maml:description><maml:para>The restore operation is a partial restore.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>PassThru</maml:name><maml:description><maml:para>Outputs the Smo Backup object used to perform the backup operation.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path of the instance of SQL Server on which you want to execute the restore operation. This is an optional parameter. If not specified, the value of this parameter uses the current working 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" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RelocateFile</maml:name><maml:description><maml:para>A list of Smo.Relocate file objects. Each object consists of a logical backup file name and a physical file system location. The restore moves the restored database into the specified physical location on the target server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">RelocateFile[]</command:parameterValue><dev:type><maml:name>RelocateFile[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReplaceDatabase</maml:name><maml:description><maml:para>Creates a new image of the database. Overwrites any existing database with the same name. When not set, the restore operation will fail if a database with that name already exists.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Restart</maml:name><maml:description><maml:para>Continues processing a partially completed restore operation. If not set (default), the cmdlet restarts an interrupted restore operation at the beginning of the backup set.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestoreAction</maml:name><maml:description><maml:para>The type of restore operation that should be performed. Valid options are Database, Files, Log, OnlinePage, OnlineFiles.
</maml:para><maml:para>Database: Restore the database.
</maml:para><maml:para>Files: Restore one or more data files. This requires the DatabaseFile or DatabaseFileGroup parameter to be set.
</maml:para><maml:para>Log: Restore the transaction log.
</maml:para><maml:para>OnlinePage: Restore a data page online while the database is still available to other users.
</maml:para><maml:para>OnlineFiles: Restore one or more data files while the database is still available to other users. This requires the DatabaseFile or DatabaseFileGroup parameter to be set.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">RestoreActionType</command:parameterValue><dev:type><maml:name>RestoreActionType</maml:name><maml:uri /></dev:type><dev:defaultValue>Microsoft.SqlServer.Management.Smo.RestoreActionType.Database</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RestrictedUser</maml:name><maml:description><maml:para>Restricts database access to the restored database to the db_owner fixed database role, and the dbcreator and sysadmin fixed server roles.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>The name of an instance of SQL Server. This server instance becomes the target of the restore operation.
</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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>SQL Server Credential that stores authentication information to authenticate to the Windows Azure Blob storage service. The authentication information stored includes Windows Azure storage account name and the associated access key values. This is a required parameter when restoring from the Windows Azure Blob storage service (URL). This parameter is not used with Disk or Tape.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StandbyFile</maml:name><maml:description><maml:para>The name of an undo file that is used as part of the imaging strategy for an instance of SQL Server.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkAfterDate</maml:name><maml:description><maml:para>Specifies the date to be used in conjunction with the mark name specified by the StopAtMarkName parameter to determine the stopping point of the recovery operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopAtMarkName</maml:name><maml:description><maml:para>Stops the recovery after a marked transaction. Used with the StopAtMarkAfterDate parameter to determine the stopping point of the recovery operation. Recovery includes the transaction that contains the mark. If the StopAtMarkAfterDate value is not set, recovery stops at the first mark with the specified name.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkAfterDate</maml:name><maml:description><maml:para>Specifies the date to be used in conjunction with StopBeforeMarkName to determine the stopping point of the recovery operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>StopBeforeMarkName</maml:name><maml:description><maml:para>Stops the recovery before a marked transaction. Used with the StopBeforeMarkAfterDate to determine the stopping point of the recovery operation.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ToPointInTime</maml:name><maml:description><maml:para>The endpoint for database log restoration. Only applies when the -RestoreAction parameter is set to Log.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>UnloadTapeAfter</maml:name><maml:description><maml:para>The tape device is rewound and unloaded when the operation is completed. When not set, no attempt is made to rewind and unload the tape medium. Does not apply to disk backups.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Smo.Server</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>

A SMO.Server object referring to the instance of SQL Server on which the restore operation should occur.


</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>  
-------------------------- EXAMPLE 1 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.bak"


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command restores the full database 'MyDB' from the file '\\share\folder\MyDB.bak' to the server instance 'computer\Instance'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 2 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.trn" -RestoreAction Log


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command restores the transaction log of the database 'MyDB' from the file '\\share\folder\MyDB.trn' to the server instance 'computer\Instance'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 3 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.bak" -Credential (Get-Credential sa)


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command restores the full database 'MyDB' from the file '\\share\folder\MyDB.trn' to the server instance 'Computer\Instance', using the sa SQL Login. This command will prompt you for a password to complete SQL authentication.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 4 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.trn" -RestoreAction Log -NoRecovery


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command restores the transaction log of the database 'MyDB' using the NORECOVERY option from the file '\\share\folder\MyDB.trn' to the server instance 'Computer\Instance'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 5 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.trn" -RestoreAction Log -ToPointInTime "Nov 11, 2011 11:11 AM"


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command restores the transaction log of the database 'MyDB' up to the date passed to the -ToPointInTime parameter, 'Nov 11, 2011 11:11 AM'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 6 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$RelocateData = New-Object Microsoft.SqlServer.Management.Smo.RelocateFile("MyDB_Data", "c:\MySQLServer\MyDB.mdf")
$RelocateLog = New-Object Microsoft.SqlServer.Management.Smo.RelocateFile("MyDB_Log", "c:\MySQLServer\MyDB.ldf")
Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "\\share\folder\MyDB.trn" -RelocateFile @($RelocateData,$RelocateLog)


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This example restores the full database 'MyDB' to the server instance 'Computer\Instance', and relocates the data and log files. For each file that is to be moved, the example constructs an instance of the Microsoft.SqlServer.Management.Smo.RelocateFile:  '$RelocateData' and '$RelocateLog'. Each constructor takes two arguments: the logical name of the file and the physical location where the file will be placed on the target server. These RelocateFile objects are passed to the -RelocateFile parameter of the Restore-SqlDatabase cmdlet.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>  
-------------------------- EXAMPLE 7 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$tapeDevice = New-Object Microsoft.Sqlserver.Management.Smo.BackupDeviceItem("\\.\tape0", "Tape")
Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupDevice $tapeDevice


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This example restores the database 'MyDB from the tape device named '\\.\tape0'' to the server instance 'computer\Instance'. To represent this device, the example constructs an instance of the Microsoft.Sqlserver.Management.Smo.BackupDeviceItem. The constructor takes two arguments: the name of the backup device ('\\.\tape0') and the type of the backup device ('Tape'). This BackupDeviceItem object is then passed to the -BackupDevice parameter of the Restore-SqlDatabase cmdlet.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>                        
-------------------------- EXAMPLE 8 --------------------------  
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;Restore-SqlDatabase -ServerInstance Computer\Instance -Database MyDB -BackupFile "https://mystorageaccountname.blob.core.windows.net/container/MyDB.bak" https://mystorageaccountname.blob.core.windows.net/container/MyDB.bak" -SqlCredential "mySqlCredential"

</dev:code><dev:remarks><maml:para>This command restores the full database 'MyDB' from the file on the Windows Azure Blob storage service to the server instance 'computer\Instance'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Resume-SqlAvailabilityDatabase</command:name><maml:description><maml:para>Resumes data movement on an availability database. </maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Resume</command:verb><command:noun>SqlAvailabilityDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>The Resume-SqlAvailabilityDatabase cmdlet resumes data movement on an availability database. Resuming a primary database resumes data movement on the corresponding secondary databases. When a particular secondary database is resumed, data movement is resumed on that database only.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Resume-SqlAvailabilityDatabase</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability database. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Resume-SqlAvailabilityDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityDatabase object of the primary or secondary database on which data movement is to be resumed.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityDatabase object of the primary or secondary database on which data movement is to be resumed.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability database. This is an optional parameter. If not specified, the value of this parameter defaults to the current working 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityDatabase</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>SQL Server Books Online: Resuming a Database in an Availability Group (SQL Server)</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>



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



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Resume-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command resumes data synchronization for the availability database 'MyDatabase' in the availability group 'MyAg'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 2 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;dir SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\AgName\AvailabilityDatabases | Resume-SqlAvailabilityDatabase


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command resumes data synchronization for all availability databases in the availability group 'MyAg' on the server instance named 'Computer\Instance'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 3 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Resume-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase -Script


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command outputs the Transact-SQL script that resumes data synchronization for the availability database 'MyDatabase' in the availability group 'MyAg' on the server instance named 'Computer\Instance'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlAuthenticationMode</command:name><maml:description><maml:para>Configures the authentication mode of the target instance of SQL Server.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlAuthenticationMode</command:noun><dev:version /></command:details><maml:description><maml:para>Configures the authentication mode of the target instance of SQL Server.</maml:para><maml:para>SQL Server Cloud Adapter must be running and accessible on the machine that hosts the instance of SQL Server.</maml:para><maml:para>This cmdlet supports the following modes of operation:</maml:para><maml:para>1. By specifying the instance PowerShell path.</maml:para><maml:para>2. By specifying the server object.</maml:para><maml:para>3. By specifying the ServerInstance of the target instance of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlAuthenticationMode</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Mode</maml:name><maml:description><maml:para>The authentication mode that will be configured on the target instance of SQL Server.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerLoginMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>The administrator credentials that will be created in the target instance of SQL Server if “Mixed Mode” authentication is enabled.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>Forces the SQL Server service to restart, if necessary, without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>Prevents a restart of the SQL Server service without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlAuthenticationMode</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Mode</maml:name><maml:description><maml:para>The authentication mode that will be configured on the target instance of SQL Server.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerLoginMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>The administrator credentials that will be created in the target instance of SQL Server if “Mixed Mode” authentication is enabled.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>Forces the SQL Server service to restart, if necessary, without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>Prevents a restart of the SQL Server service without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The server object of the target instance.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlAuthenticationMode</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Mode</maml:name><maml:description><maml:para>The authentication mode that will be configured on the target instance of SQL Server.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerLoginMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>The administrator credentials that will be created in the target instance of SQL Server if “Mixed Mode” authentication is enabled.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>Forces the SQL Server service to restart, if necessary, without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>Prevents a restart of the SQL Server service without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>This parameter specifies the name of an instance of SQL Server that becomes the target of the operation.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>Forces the SQL Server service to restart, if necessary, without prompting the user.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The server object of the target instance.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Mode</maml:name><maml:description><maml:para>The authentication mode that will be configured on the target instance of SQL Server.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">ServerLoginMode</command:parameterValue><dev:type><maml:name>ServerLoginMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>Prevents a restart of the SQL Server service without prompting the user.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter defaults to the current working 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>This parameter specifies the name of an instance of SQL Server that becomes the target of the operation.</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" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>The administrator credentials that will be created in the target instance of SQL Server if “Mixed Mode” authentication is enabled.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;CD SQLSERVER:\SQL\Computer\Instance;
Set-SqlAuthenticationMode -Credential $credential  Integrated -ForceServiceRestart  -AcceptSelfSignedCertificate;

</dev:code><dev:remarks><maml:para>This command configures the authentication mode to ‘Integrated’ for the server instance ‘Computer\Instance’. The current working directory is used to determine the server instance where the operation should occur. The SQL Server service will be automatically restarted automatically, without prompting the user. The self-signed certificate of the target machine will be automatically accepted without prompting the user.</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and configures the authentication mode to ‘Mixed’, with the provided SQL credentials for each one of them. The SQL Server service will not be restarted automatically. The self-signed certificate of the target machine will be automatically accepted without prompting the user.
PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName "MachineName"  | Set-SqlAuthenticationMode -Credential $credential -Mode Mixed -SqlCredential $sqlCredential -NoServiceRestart  -AcceptSelfSignedCertificate;

</dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlAvailabilityGroup</command:name><maml:description><maml:para>This cmdlet modifies settings on an existing availability group.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlAvailabilityGroup</command:noun><dev:version /></command:details><maml:description><maml:para>The Set-SqlAvailabilityGroup cmdlet modifies the AutomatedBackupPreference, FailureConditionLevel, and HealthCheckTimeout settings on an existing availability group. This cmdlet can be executed only at the server instance that hosts the primary replica.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlAvailabilityGroup</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>The automated backup preference for the availability group. Valid options are:
</maml:para><maml:para>Primary: Specifies that the backups always occur on the primary replica, wherever it is. This is often because the user needs features not available when backup is run on a secondary, such as differential backups.
</maml:para><maml:para>SecondaryOnly: Specifies that backups are never performed on primary replicas. If the primary replica is the only replica online, the backup will not occur.
</maml:para><maml:para>Secondary: Specifies that backups occur on secondary replicas unless the primary replica is the only replica online. Then the backup occurs on the primary replica.
</maml:para><maml:para>None: This option specifies that you do not want primary/secondary status taken into account when choosing the replica to perform backups. The BackupPriority in combination with the Online/Connected status are the only factors considered.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>Determines the automatic failover behavior of the availability group. Valid options are:
</maml:para><maml:para>OnServerDown: Failover or restart when the SQL Server service stops.
</maml:para><maml:para>OnServerUnresponsive: Failover or restart when any condition of lower value is satisfied, plus when the SQL Server service is connected to the cluster and the "HealthCheckTimeout" threshold is exceeded, or when the Availability Replica currently in primary role is in a failed state. (See HealthCheckTimeout parameter.)
</maml:para><maml:para>OnCriticalServerError: Failover or restart when any condition of lower value is satisfied, plus when an internal critical Server error occurs (out of memory condition, serious write-access violation, or too much dumping).
</maml:para><maml:para>OnModerateServerError: Failover or restart when any condition of lower value is satisfied, plus when a moderate Server error occurs (persistent out of memory condition).
</maml:para><maml:para>OnAnyQualifiedFailureConditions: Failover or restart when any condition of lower value is satisfied, plus when a qualifying failure condition occurs (engine worker thread exhaustion, unsolvable deadlock detected).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>The length of time in milliseconds after which an unresponsive server is declared unhealthy.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityGroup object of the availability group to be modified.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>The automated backup preference for the availability group. Valid options are:
</maml:para><maml:para>Primary: Specifies that the backups always occur on the primary replica, wherever it is. This is often because the user needs features not available when backup is run on a secondary, such as differential backups.
</maml:para><maml:para>SecondaryOnly: Specifies that backups are never performed on primary replicas. If the primary replica is the only replica online, the backup will not occur.
</maml:para><maml:para>Secondary: Specifies that backups occur on secondary replicas unless the primary replica is the only replica online. Then the backup occurs on the primary replica.
</maml:para><maml:para>None: This option specifies that you do not want primary/secondary status taken into account when choosing the replica to perform backups. The BackupPriority in combination with the Online/Connected status are the only factors considered.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>Determines the automatic failover behavior of the availability group. Valid options are:
</maml:para><maml:para>OnServerDown: Failover or restart when the SQL Server service stops.
</maml:para><maml:para>OnServerUnresponsive: Failover or restart when any condition of lower value is satisfied, plus when the SQL Server service is connected to the cluster and the "HealthCheckTimeout" threshold is exceeded, or when the Availability Replica currently in primary role is in a failed state. (See HealthCheckTimeout parameter.)
</maml:para><maml:para>OnCriticalServerError: Failover or restart when any condition of lower value is satisfied, plus when an internal critical Server error occurs (out of memory condition, serious write-access violation, or too much dumping).
</maml:para><maml:para>OnModerateServerError: Failover or restart when any condition of lower value is satisfied, plus when a moderate Server error occurs (persistent out of memory condition).
</maml:para><maml:para>OnAnyQualifiedFailureConditions: Failover or restart when any condition of lower value is satisfied, plus when a qualifying failure condition occurs (engine worker thread exhaustion, unsolvable deadlock detected).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>The length of time in milliseconds after which an unresponsive server is declared unhealthy.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AutomatedBackupPreference</maml:name><maml:description><maml:para>The automated backup preference for the availability group. Valid options are:
</maml:para><maml:para>Primary: Specifies that the backups always occur on the primary replica, wherever it is. This is often because the user needs features not available when backup is run on a secondary, such as differential backups.
</maml:para><maml:para>SecondaryOnly: Specifies that backups are never performed on primary replicas. If the primary replica is the only replica online, the backup will not occur.
</maml:para><maml:para>Secondary: Specifies that backups occur on secondary replicas unless the primary replica is the only replica online. Then the backup occurs on the primary replica.
</maml:para><maml:para>None: This option specifies that you do not want primary/secondary status taken into account when choosing the replica to perform backups. The BackupPriority in combination with the Online/Connected status are the only factors considered.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupAutomatedBackupPreference</command:parameterValue><dev:type><maml:name>AvailabilityGroupAutomatedBackupPreference</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailureConditionLevel</maml:name><maml:description><maml:para>Determines the automatic failover behavior of the availability group. Valid options are:
</maml:para><maml:para>OnServerDown: Failover or restart when the SQL Server service stops.
</maml:para><maml:para>OnServerUnresponsive: Failover or restart when any condition of lower value is satisfied, plus when the SQL Server service is connected to the cluster and the "HealthCheckTimeout" threshold is exceeded, or when the Availability Replica currently in primary role is in a failed state. (See HealthCheckTimeout parameter.)
</maml:para><maml:para>OnCriticalServerError: Failover or restart when any condition of lower value is satisfied, plus when an internal critical Server error occurs (out of memory condition, serious write-access violation, or too much dumping).
</maml:para><maml:para>OnModerateServerError: Failover or restart when any condition of lower value is satisfied, plus when a moderate Server error occurs (persistent out of memory condition).
</maml:para><maml:para>OnAnyQualifiedFailureConditions: Failover or restart when any condition of lower value is satisfied, plus when a qualifying failure condition occurs (engine worker thread exhaustion, unsolvable deadlock detected).
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityGroupFailureConditionLevel</command:parameterValue><dev:type><maml:name>AvailabilityGroupFailureConditionLevel</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>HealthCheckTimeout</maml:name><maml:description><maml:para>The length of time in milliseconds after which an unresponsive server is declared unhealthy.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityGroup object of the availability group to be modified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>



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



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityGroup -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAG -HealthCheckTimeout 120000


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command sets the HealhCheckTimeout property on the availability group 'MyAg' to 120,000 milliseconds (two minutes). If the primary server is unresponsive for this length of time and automatic failover is enabled, an automatic failover will be initiated.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 2 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityGroup -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg -AutomatedBackupPreference SecondaryOnly


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command sets the AutomatedBackupPreference property on the availability group 'MyAg' to 'SecondaryOnly'. Automated backups of databases in this availability group will never occur on the primary replica, but will be redirected to the secondary replica with the highest backup priority (see the BackupPriority property of availability replicas).
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 3 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityGroup -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg -FailureConditionLevel OnServerDown


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command sets the FailureConditionLevel property on the availability group 'MyAg' to 'OnServerDown'. This means that when the server instance hosting the primary replica goes offline and automatic failover is enabled, an automatic failover will be initiated.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlAvailabilityGroupListener</command:name><maml:description><maml:para>This cmdlet modifies the port setting on an existing availability group listener.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlAvailabilityGroupListener</command:noun><dev:version /></command:details><maml:description><maml:para>The Set-SqlAvailabilityGroupListener cmdlet modifies the port setting on an existing availability group listener. This cmdlet can be executed only at the server instance that hosts the primary replica.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlAvailabilityGroupListener</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group listener. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>The TCP port that the listener will use to listen for connections. The default port is TCP port 1433. If you have security concerns, we recommend using a different port number.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlAvailabilityGroupListener</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The SMO AvailabilityGroupListener object of the listener to be modified.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>The TCP port that the listener will use to listen for connections. The default port is TCP port 1433. If you have security concerns, we recommend using a different port number.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The SMO AvailabilityGroupListener object of the listener to be modified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group listener. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>The TCP port that the listener will use to listen for connections. The default port is TCP port 1433. If you have security concerns, we recommend using a different port number.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue>1433</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>



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



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityGroupListener -Port 1535 -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityGroupListeners\MyListener


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command sets the port number for the availability group listener named 'MyListener' to 1535. This port is used to listen for connections to the listener.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 2 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityGroupListener -Port 1535 -Script -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityGroupListeners\MyListener


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command generates the Transact-SQL script that sets the port number for the availability group listener named 'MyListener' to 1535. The port number is not actually changed by this command.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlAvailabilityReplica</command:name><maml:description><maml:para>This cmdlet modifies the settings on an existing availability replica.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlAvailabilityReplica</command:noun><dev:version /></command:details><maml:description><maml:para>The Set-SqlAvailabilityReplica cmdlet sets or modifies a variety of properties for an availability replica. This cmdlet can be executed only at the server instance that hosts the primary replica.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlAvailabilityReplica</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability replica. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>The availability mode of the replica. Options are: SynchronousCommit or AsynchronousCommit.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>This option is an integer in the range of 0..100, and represents the desired priority of the replicas in performing backups. Of the set of replicas which are online and available, the replica with the highest priority will be chosen to perform the backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>How the availability replica should handle connections when in the primary role. Valid settings are:
</maml:para><maml:para>AllowReadWriteConnections: Allow read/write connections
</maml:para><maml:para>AllowAllConnections: Allow all connections
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>How the availability replica should handle connections when in the secondary role. Valid settings are:
</maml:para><maml:para>AllowNoConnections: Disallows connections
</maml:para><maml:para>AllowReadIntentConnectionsOnly: Allows only read-intent connections
</maml:para><maml:para>AllowAllConnections: Allows all connections
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>The URL of the endpoint in the format of TCP://System-address:port
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>The failover mode of the replica. Options are: Manual or Automatic.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>The connectivity fully-qualified domain name (FQDN) and port to use when routing to the replica for read-only connections. For example:
</maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>An ordered list of replica server names that represent the probe sequence for connection director to use when redirecting read-only connections through this availability replica. This is applicable when the availability replica is the current primary of the availability group.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>The number of seconds to wait for a response between the primary replica and this replica before considering the connection failed.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityReplica object of the replica to be modified.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>The availability mode of the replica. Options are: SynchronousCommit or AsynchronousCommit.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>This option is an integer in the range of 0..100, and represents the desired priority of the replicas in performing backups. Of the set of replicas which are online and available, the replica with the highest priority will be chosen to perform the backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>How the availability replica should handle connections when in the primary role. Valid settings are:
</maml:para><maml:para>AllowReadWriteConnections: Allow read/write connections
</maml:para><maml:para>AllowAllConnections: Allow all connections
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>How the availability replica should handle connections when in the secondary role. Valid settings are:
</maml:para><maml:para>AllowNoConnections: Disallows connections
</maml:para><maml:para>AllowReadIntentConnectionsOnly: Allows only read-intent connections
</maml:para><maml:para>AllowAllConnections: Allows all connections
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>The URL of the endpoint in the format of TCP://System-address:port
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>The failover mode of the replica. Options are: Manual or Automatic.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>The connectivity fully-qualified domain name (FQDN) and port to use when routing to the replica for read-only connections. For example:
</maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>An ordered list of replica server names that represent the probe sequence for connection director to use when redirecting read-only connections through this availability replica. This is applicable when the availability replica is the current primary of the availability group.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>The number of seconds to wait for a response between the primary replica and this replica before considering the connection failed.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AvailabilityMode</maml:name><maml:description><maml:para>The availability mode of the replica. Options are: SynchronousCommit or AsynchronousCommit.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaAvailabilityMode</command:parameterValue><dev:type><maml:name>AvailabilityReplicaAvailabilityMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupPriority</maml:name><maml:description><maml:para>This option is an integer in the range of 0..100, and represents the desired priority of the replicas in performing backups. Of the set of replicas which are online and available, the replica with the highest priority will be chosen to perform the backup.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInPrimaryRole</maml:name><maml:description><maml:para>How the availability replica should handle connections when in the primary role. Valid settings are:
</maml:para><maml:para>AllowReadWriteConnections: Allow read/write connections
</maml:para><maml:para>AllowAllConnections: Allow all connections
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInPrimaryRole</command:parameterValue><dev:type><maml:name>AvailabilityReplicaConnectionModeInPrimaryRole</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ConnectionModeInSecondaryRole</maml:name><maml:description><maml:para>How the availability replica should handle connections when in the secondary role. Valid settings are:
</maml:para><maml:para>AllowNoConnections: Disallows connections
</maml:para><maml:para>AllowReadIntentConnectionsOnly: Allows only read-intent connections
</maml:para><maml:para>AllowAllConnections: Allows all connections
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaConnectionModeInSecondaryRole</command:parameterValue><dev:type><maml:name>AvailabilityReplicaConnectionModeInSecondaryRole</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EndpointUrl</maml:name><maml:description><maml:para>The URL of the endpoint in the format of TCP://System-address:port
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>FailoverMode</maml:name><maml:description><maml:para>The failover mode of the replica. Options are: Manual or Automatic.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">AvailabilityReplicaFailoverMode</command:parameterValue><dev:type><maml:name>AvailabilityReplicaFailoverMode</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityReplica object of the replica to be modified.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability replica. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadonlyRoutingConnectionUrl</maml:name><maml:description><maml:para>The connectivity fully-qualified domain name (FQDN) and port to use when routing to the replica for read-only connections. For example:
</maml:para><maml:para>TCP://DBSERVER8.manufacturing.Adventure-Works.com:7024
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ReadOnlyRoutingList</maml:name><maml:description><maml:para>An ordered list of replica server names that represent the probe sequence for connection director to use when redirecting read-only connections through this availability replica. This is applicable when the availability replica is the current primary 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SessionTimeout</maml:name><maml:description><maml:para>The number of seconds to wait for a response between the primary replica and this replica before considering the connection failed.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityReplica</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>

The Availability Replica that is to be modified.


</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> 
 
-------------------------- EXAMPLE 1 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityReplica -AvailabilityMode "SynchronousCommit" -FailoverMode "Automatic" -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command modifies the replica 'MyReplica' in the availability group 'MyAg' to use synchronous-commit availability mode and to support automatic failover.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 2 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityReplica -AvailabilityMode "AsynchronousCommit" -FailoverMode "Manual" -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command modifies the replica 'MyReplica' in the availability group 'MyAg' to use asynchronous-commit availability mode and to support only forced manual failover (with possible data loss).
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 3 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityReplica -ConnectionModeInSecondaryRole "AllowAllConnections" -Path SQLSERVER:\Sql\PrimaryServer\InstanceName\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command modifies the replica 'MyReplica' in the availability group 'MyAg' to allow all connections in the secondary role. This is useful if you want to offload read-only data processing workloads to secondary replicas.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 4 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-Location SQLSERVER:\SQL\PrimaryServer\default\AvailabilityGroups\MyAg
$primaryReplica = Get-Item "AvailabilityReplicas\PrimaryServer"
$secondaryReplica = Get-Item "AvailabilityReplicas\SecondaryServer"

Set-SqlAvailabilityReplica -ReadOnlyRoutingConnectionUrl "TCP://PrimaryServer.domain.com:5022" -InputObject $primaryReplica
Set-SqlAvailabilityReplica -ReadOnlyRoutingConnectionUrl "TCP://SecondaryServer.domain.com:5022" -InputObject $secondaryReplica
Set-SqlAvailabilityReplica -ReadOnlyRoutingList "SecondaryServer","PrimaryServer" -InputObject $primaryReplica


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This example configures the primary replica and one secondary replica in an availability group for read-only routing. If the ConnectionModeInSecondaryRole option is set to AllowAllConnections or AllowReadIntentConnectionsOnly, read-only routing allows the secondary replica to receive and accept read requests when the client connects to the availability group through a virtual network name. First, the example assigns a read-only routing URL to each replica. Then it sets the read-only routing list on the primary replica. Connections with the "ReadOnly" property set in the connection string will be redirected to the secondary replica. If this secondary replica is not readable (as determined by the ConnectionModeInSecondaryRole setting), the connection will be directed back to the primary replica.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 5 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlAvailabilityReplica -BackupPriority 60 -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command sets the backup priority of the availability replica 'MyReplica' to 60. This priority is used by the server instance that hosts the primary replica to decide which replica should service an automated backup request on a database in the availability group (the replica with highest priority is chosen). This priority can be any number between 0 and 100, inclusive. A priority of 0 indicates that the replica should not be considered as a candidate for servicing backup requests.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlCredential</command:name><maml:description><maml:para>Sets the properties for the SQL Credential object</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlCredential</command:noun><dev:version /></command:details><maml:description><maml:para>You can set the Identity and password properties for a SQL Credential object using this cmdlet. This cmdlet supports the two following modes of operation:

1. By specifying the path or location of the credential including the credential name using the –path parameter.

2. By passing a Smo.Credential object to the object using the –InputObject.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlCredential</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the Credential on which you want to perform this operation. Ex: SQLSERVER:\SQL\Computer\Instance\Credentials\Credential
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>Specify the user or account name for the resource SQL Server needs to authenticate to. For Windows Azure storage service, this is the name of the Windows Azure storage account.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="4" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>Use this parameter to specify the password for the user or account. For Windows Azure Storage service, this is the access key value for the Windows Azure storage account.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlCredential</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>An Input Credential object. This object can be retrieved using the Get-SqlCredential cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>Specify the user or account name for the resource SQL Server needs to authenticate to. For Windows Azure storage service, this is the name of the Windows Azure storage account.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="4" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>Use this parameter to specify the password for the user or account. For Windows Azure Storage service, this is the access key value for the Windows Azure storage account.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Identity</maml:name><maml:description><maml:para>Specify the user or account name for the resource SQL Server needs to authenticate to. For Windows Azure storage service, this is the name of the Windows Azure storage account.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>An Input Credential object. This object can be retrieved using the Get-SqlCredential cmdlet.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the Credential on which you want to perform this operation. Ex: SQLSERVER:\SQL\Computer\Instance\Credentials\Credential
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="4" aliases=""><maml:name>Secret</maml:name><maml:description><maml:para>Use this parameter to specify the password for the user or account. For Windows Azure Storage service, this is the access key value for the Windows Azure storage account.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">SecureString</command:parameterValue><dev:type><maml:name>SecureString</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>

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


                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;Set-SqlCredential -Path SQLSERVER:\SQL\Computer\Instance\Credentials\MySqlCredential –Identity "mystorageaccount"


</dev:code><dev:remarks><maml:para>This command sets the identity of MySqlCredential to ‘mystorageaccount’ by specifying the path of the SQL Credential.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>

-------------------------- EXAMPLE 2 -------------------------- 


                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;The command retrieves the credential object from the Get-Credential cmdlet and then pipes it to the Set-Sql Credential cmdlet to set the identity of mySqLCrendential to  ‘mystorageaccount’.
PS C:\&gt; $cred = Get-SqlCredential -Name MySqlCredential
$cred | Set-SqlCredential –Identity "mystorageaccount"


</dev:code><dev:remarks></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>

-------------------------- EXAMPLE 3-------------------------- 


                      </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;The command prompts for the storage access key information and the Set-Sql Credential cmdlet to set the value for SECRET with the input value.
PS C:\&gt; $secret = read-host "Please enter the storage account access key"
PS C:\&gt;  Set-SqlCredential –Identity "mystorageaccount" –Secret $secret


</dev:code><dev:remarks></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlHADREndpoint</command:name><maml:description><maml:para>Sets the properties of an existing database mirroring endpoint.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlHADREndpoint</command:noun><dev:version /></command:details><maml:description><maml:para>The Set-SqlHadrEndpoint cmdlet allows one to change the properties of an existing database mirroring endpoint (the name, state, authentication properties, and so forth).
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlHADREndpoint</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the database mirroring endpoint. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>The order and type of authentication that is used by the endpoint. The options are Certificate, CertificateKerberos , CertificateNegotiate, CertificateNtlm, Kerberos, KerberosCertificate, Negotiate, NegotiateCertificate, Ntlm, and NtlmCertificate. If the specified option calls for a certificate, the -Certificate parameter must also be set, unless a certificate is already associated with the endpoint.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>The name of the certificate the endpoint should use to authenticate connections. 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="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>The endpoint encryption setting. The options are Disabled, Supported, or Required.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>The form of encryption used by the endpoint. The options are Aes, AesRC4, None, RC4, and RC4Aes.
</maml:para><maml:para>NOTE:  The RC4 algorithm is only supported for backward compatibility. New material can only be encrypted using RC4 or RC4_128 when the database is in compatibility level 90 or 100. (Not recommended.) Use a newer algorithm such as one of the AES algorithms instead.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>The IP address on which the endpoint will listen.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>The owner of the endpoint.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>The TCP port number used by the endpoint to listen for connections.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>State</maml:name><maml:description><maml:para>The state of the endpoint: Started, Stopped, or Disabled.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointState</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlHADREndpoint</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Endpoint object of the endpoint that shall be modified. This must be a database mirroring endpoint.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>The order and type of authentication that is used by the endpoint. The options are Certificate, CertificateKerberos , CertificateNegotiate, CertificateNtlm, Kerberos, KerberosCertificate, Negotiate, NegotiateCertificate, Ntlm, and NtlmCertificate. If the specified option calls for a certificate, the -Certificate parameter must also be set, unless a certificate is already associated with the endpoint.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>The name of the certificate the endpoint should use to authenticate connections. 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="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>The endpoint encryption setting. The options are Disabled, Supported, or Required.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>The form of encryption used by the endpoint. The options are Aes, AesRC4, None, RC4, and RC4Aes.
</maml:para><maml:para>NOTE:  The RC4 algorithm is only supported for backward compatibility. New material can only be encrypted using RC4 or RC4_128 when the database is in compatibility level 90 or 100. (Not recommended.) Use a newer algorithm such as one of the AES algorithms instead.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>The IP address on which the endpoint will listen.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>The owner of the endpoint.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>The TCP port number used by the endpoint to listen for connections.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>State</maml:name><maml:description><maml:para>The state of the endpoint: Started, Stopped, or Disabled.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointState</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AuthenticationOrder</maml:name><maml:description><maml:para>The order and type of authentication that is used by the endpoint. The options are Certificate, CertificateKerberos , CertificateNegotiate, CertificateNtlm, Kerberos, KerberosCertificate, Negotiate, NegotiateCertificate, Ntlm, and NtlmCertificate. If the specified option calls for a certificate, the -Certificate parameter must also be set, unless a certificate is already associated with the endpoint.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointAuthenticationOrder</command:parameterValue><dev:type><maml:name>EndpointAuthenticationOrder</maml:name><maml:uri /></dev:type><dev:defaultValue>SMO.EndpointAuthenticationOrder.Negotiate</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Certificate</maml:name><maml:description><maml:para>The name of the certificate the endpoint should use to authenticate connections. 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="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Encryption</maml:name><maml:description><maml:para>The endpoint encryption setting. The options are Disabled, Supported, or Required.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryption</command:parameterValue><dev:type><maml:name>EndpointEncryption</maml:name><maml:uri /></dev:type><dev:defaultValue>SMO.EndpointAuthentication.Required</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionAlgorithm</maml:name><maml:description><maml:para>The form of encryption used by the endpoint. The options are Aes, AesRC4, None, RC4, and RC4Aes.
</maml:para><maml:para>NOTE:  The RC4 algorithm is only supported for backward compatibility. New material can only be encrypted using RC4 or RC4_128 when the database is in compatibility level 90 or 100. (Not recommended.) Use a newer algorithm such as one of the AES algorithms instead.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointEncryptionAlgorithm</command:parameterValue><dev:type><maml:name>EndpointEncryptionAlgorithm</maml:name><maml:uri /></dev:type><dev:defaultValue>RC4</dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Endpoint object of the endpoint that shall be modified. This must be a database mirroring endpoint.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>IpAddress</maml:name><maml:description><maml:para>The IP address on which the endpoint will listen.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">IPAddress</command:parameterValue><dev:type><maml:name>IPAddress</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Owner</maml:name><maml:description><maml:para>The owner of the endpoint.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the database mirroring endpoint. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>The TCP port number used by the endpoint to listen for connections.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue>4022</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>State</maml:name><maml:description><maml:para>The state of the endpoint: Started, Stopped, or Disabled.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">EndpointState</command:parameterValue><dev:type><maml:name>EndpointState</maml:name><maml:uri /></dev:type><dev:defaultValue>SMO.EndpointState.Stopped</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>SMO.Endpoint</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>

An AlwaysOn endpoint whose properties are to be set.


</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name>SMO.Endpoint</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> 
 
-------------------------- EXAMPLE 1 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlHadrEndpoint -Path SQLSERVER:\Sql\Computer\Instance\Endpoints\MyDbmEndpoint -Port 5050


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command sets the port number of the database mirroring endpoint named 'MyDbmEndpoint' to 5050 on the server instance 'Computer\Instance'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 2 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Set-SqlHadrEndpoint -Path SQLSERVER:\Sql\Computer\Instance\Endpoints\MyDbmEndpoint -State Started


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command starts the database mirroring endpoint named 'MyDbmEndpoint' on the server instance 'Computer\Instance'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlNetworkConfiguration</command:name><maml:description><maml:para>Sets the network configuration of the target instance of SQL Server.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlNetworkConfiguration</command:noun><dev:version /></command:details><maml:description><maml:para>Sets the network configuration of the target instance of SQL Server.</maml:para><maml:para>SQL Server Cloud Adapter must be running and accessible on the machine that hosts the instance of SQL Server.</maml:para><maml:para>This cmdlet supports the following modes of operation:</maml:para><maml:para>1. By specifying the instance PowerShell path.</maml:para><maml:para>2. By specifying the server object.</maml:para><maml:para>3. By specifying the ServerInstance of the target instance of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlNetworkConfiguration</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Protocol</maml:name><maml:description><maml:para>Specifies the network protocol that we want to configure on the target instance of SQL Server.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Protocols</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>The port to accept TCP connections. To configure dynamic ports, this parameter should be set to zero.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Disable</maml:name><maml:description><maml:para>Specifies that we want to disable the specified network protocol on the target instance of SQL Server.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>Forces the SQL Server service to restart, if necessary, without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>Prevents restarting the SQL Server service without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlNetworkConfiguration</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Protocol</maml:name><maml:description><maml:para>Specifies the network protocol that we want to configure on the target instance of SQL Server.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Protocols</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>The port to accept TCP connections. To configure dynamic ports, this parameter should be set to zero.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Disable</maml:name><maml:description><maml:para>Specifies that we want to disable the specified network protocol on the target instance of SQL Server.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>Forces the SQL Server service to restart, if necessary, without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>Prevents restarting the SQL Server service without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The server object of the target instance.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlNetworkConfiguration</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Protocol</maml:name><maml:description><maml:para>Specifies the network protocol that we want to configure on the target instance of SQL Server.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Protocols</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>The port to accept TCP connections. To configure dynamic ports, this parameter should be set to zero.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Disable</maml:name><maml:description><maml:para>Specifies that we want to disable the specified network protocol on the target instance of SQL Server.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>Forces the SQL Server service to restart, if necessary, without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>Prevents restarting the SQL Server service without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>This parameter specifies the name of an instance of SQL Server that becomes the target of the operation.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Disable</maml:name><maml:description><maml:para>Specifies that we want to disable the specified network protocol on the target instance of SQL Server.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ForceServiceRestart</maml:name><maml:description><maml:para>Forces the SQL Server service to restart, if necessary, without prompting the user.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The server object of the target instance.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoServiceRestart</maml:name><maml:description><maml:para>Prevents restarting the SQL Server service without prompting the user.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter defaults to the current working 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" variableLength="false" globbing="false" pipelineInput="false" position="3" aliases=""><maml:name>Port</maml:name><maml:description><maml:para>The port to accept TCP connections. To configure dynamic ports, this parameter should be set to zero.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Protocol</maml:name><maml:description><maml:para>Specifies the network protocol that we want to configure on the target instance of SQL Server.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Protocols</command:parameterValue><dev:type><maml:name>Protocols</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>This parameter specifies the name of an instance of SQL Server that becomes the target of the operation.</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" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;CD SQLSERVER:\SQL\Computer\Instance;
Set-SqlNetworkConfiguration -Credential $credential -Protocol TCP -Port 1433 -NoServiceRestart -AcceptSelfSignedCertificate;

</dev:code><dev:remarks><maml:para>This command sets the network configuration to accept TCP connections at port 1433 for the server instance ‘Computer\Instance’. The current working directory is used to determine the server instance where the operation should occur. The SQL Server service will not be restarted automatically. The self-signed certificate of the target machine will be automatically accepted without prompting the user.</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and disables TCP connections for each one of them. The SQL Server service will not be restarted automatically. The self-signed certificate of the target machine will be automatically accepted without prompting the user.
PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName "MachineName"  | Set-SqlNetworkConfiguration -Credential $credential -Protocol TCP -Disable -NoServiceRestart -AcceptSelfSignedCertificate;

</dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Set-SqlSmartAdmin</command:name><maml:description><maml:para>This cmdlet configures or modifies backup retention and storage settings.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Set</command:verb><command:noun>SqlSmartAdmin</command:noun><dev:version /></command:details><maml:description><maml:para>The Set-SqlSmartAdmin cmdlet configures or modifies the BackupEnabled, BackupRetentionPeriodinDays, MasterSwitch, and SqlCredential parameter settings. This cmdlet can be executed for only instance level configurations and not for a specific database.</maml:para><maml:para>This cmdlet supports the following modes of operation to return the object: 

 1. Pass a Smo.Server object to the -InputObject parameter, either directly or through the pipeline.

 2. Pass the path of the instance of SQL Server to the -Path parameter</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Set-SqlSmartAdmin</maml:name><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server. This is an optional parameter. If not specified, the value of the parameter uses the current working directory. This is useful when you are creating scripts to manage multiple instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupEnabled</maml:name><maml:description><maml:para>Parameter used to enable or disable SQL Server Managed Backup to Windows Azure.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupRetentionPeriodInDays</maml:name><maml:description><maml:para>The number of days the backup files should be retained. This determines the timeframe of the recoverability for the databases. For example if you set the value for 30 days, you can recover a database to a point in time in the last 30 days.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>The encryption options.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MasterSwitch</maml:name><maml:description><maml:para>Used to pause or restart all services under Smart Admin including SQL Server Managed Backup to Windows Azure. This is a required parameter.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>The SqlCredential object that is used to authenticate to the Windows Azure storage account. This is a required parameter.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Set-SqlSmartAdmin</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Smo Smart Admin object.  This object can be retrieved using the Get-SqlSmartAdmin cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupEnabled</maml:name><maml:description><maml:para>Parameter used to enable or disable SQL Server Managed Backup to Windows Azure.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupRetentionPeriodInDays</maml:name><maml:description><maml:para>The number of days the backup files should be retained. This determines the timeframe of the recoverability for the databases. For example if you set the value for 30 days, you can recover a database to a point in time in the last 30 days.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>The encryption options.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MasterSwitch</maml:name><maml:description><maml:para>Used to pause or restart all services under Smart Admin including SQL Server Managed Backup to Windows Azure. This is a required parameter.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>The SqlCredential object that is used to authenticate to the Windows Azure storage account. This is a required parameter.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupEnabled</maml:name><maml:description><maml:para>Parameter used to enable or disable SQL Server Managed Backup to Windows Azure.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue><dev:type><maml:name>Boolean</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>BackupRetentionPeriodInDays</maml:name><maml:description><maml:para>The number of days the backup files should be retained. This determines the timeframe of the recoverability for the databases. For example if you set the value for 30 days, you can recover a database to a point in time in the last 30 days.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>EncryptionOption</maml:name><maml:description><maml:para>The encryption options.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">BackupEncryptionOptions</command:parameterValue><dev:type><maml:name>BackupEncryptionOptions</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The Smo Smart Admin object.  This object can be retrieved using the Get-SqlSmartAdmin cmdlet.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">T</command:parameterValue><dev:type><maml:name>T</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>MasterSwitch</maml:name><maml:description><maml:para>Used to pause or restart all services under Smart Admin including SQL Server Managed Backup to Windows Azure. This is a required parameter.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue><dev:type><maml:name>Boolean</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server. This is an optional parameter. If not specified, the value of the parameter uses the current working directory. This is useful when you are creating scripts to manage multiple instances.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">String</command:parameterValue><dev:type><maml:name>String</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>SqlCredential</maml:name><maml:description><maml:para>The SqlCredential object that is used to authenticate to the Windows Azure storage account. This is a required parameter.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSObject</command:parameterValue><dev:type><maml:name>PSObject</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> 
 
-------------------------- EXAMPLE 1 -------------------------- 
 
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\ PS&gt; cd SQLSERVER:\SQL\Computer\MyInstance 
</dev:code><dev:code>PS C:\&gt;Get-SqlSmartAdmin | Set-SqlSmartAdmin –BackupEnabled $True –BackupRetentionPeriodInDays 10
</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This example configures the Cloud Backup settings for ‘MyInstance’. It retrieves the Smart Admin Object using the Get-SqlSmartAdmin cmdlet and pipes it to the Set-SqlSmartAdmin cmdlet. </maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 2 -------------------------- 
 
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\ PS&gt; cd SQLSERVER:\SQL\Computer\MyInstance 
</dev:code><dev:code>PS C:\&gt;Get-SqlSmartAdmin | Set-SqlSmartAdmin –MasterSwitch $False
</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This example pauses the SQL Server Managed Backup services for the whole instance.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 3 -------------------------- 
 
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\ PS&gt; cd SQLSERVER:\SQL\Computer\MyInstance 
</dev:code><dev:code>PS C:\&gt;Get-SqlSmartAdmin | Set-SqlSmartAdmin –MasterSwitch $True
</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This example resumes the SQL Server Managed Backup to Windows Azure services.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 4 -------------------------- 
 
                       </maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;$encryptionOption = New-SqlBackupEncryptionOption -EncryptionAlgorithm Aes128 -EncryptorType ServerCertificate -EncryptorName "MyBackupCert"
</dev:code><dev:code>PS C:\&gt;Get-SqlSmartAdmin | Set-SqlSmartAdmin -EncryptionOption $encryptionOption
</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This example sets the encryption option for SQL Server Managed Backup to Windows Azure by supplying the –EncryptionOption parameter.</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Start-SqlInstance</command:name><maml:description><maml:para>Starts the specified instance of SQL Server.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Start</command:verb><command:noun>SqlInstance</command:noun><dev:version /></command:details><maml:description><maml:para>Starts the specified instance of SQL Server.</maml:para><maml:para>SQL Server Cloud Adapter must be running and accessible on the computer that hosts the instance of SQL Server.</maml:para><maml:para>This cmdlet supports the following modes of operation:</maml:para><maml:para>1. By specifying the instance PowerShell path.</maml:para><maml:para>2. By specifying the server object.</maml:para><maml:para>3. By specifying the ServerInstance of the target instance of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Start-SqlInstance</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Start-SqlInstance</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The server object of the target instance.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Start-SqlInstance</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>This parameter specifies the name of an instance of SQL Server that becomes the target of the operation.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The server object of the target instance.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter defaults to the current working 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>This parameter specifies the name of an instance of SQL Server that becomes the target of the operation.</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" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;CD SQLSERVER:\SQL\Computer\Instance;
Start-SqlInstance -Credential $credential -AcceptSelfSignedCertificate;

</dev:code><dev:remarks><maml:para>This command starts the server instance ‘Computer\Instance’. The current working directory is used to determine the server instance where the operation should occur. The self-signed certificate of the target machine will be automatically accepted without prompting the user.</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and starts all the instances. The self-signed certificate of the target machine will be automatically accepted without prompting the user.
PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName "MachineName"  | Start-SqlInstance -Credential $credential -AcceptSelfSignedCertificate;

</dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Stop-SqlInstance</command:name><maml:description><maml:para>Stops the specified instance of SQL Server.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Stop</command:verb><command:noun>SqlInstance</command:noun><dev:version /></command:details><maml:description><maml:para>Stops the specified instance of SQL Server.</maml:para><maml:para>SQL Server Cloud Adapter must be running and accessible on the computer that hosts the instance of SQL Server.</maml:para><maml:para>This cmdlet supports the following modes of operation:</maml:para><maml:para>1. By specifying the instance PowerShell path.</maml:para><maml:para>2. By specifying the server object.</maml:para><maml:para>3. By specifying the ServerInstance of the target instance of SQL Server.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Stop-SqlInstance</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Stop-SqlInstance</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The server object of the target instance.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Stop-SqlInstance</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>This parameter specifies the name of an instance of SQL Server that becomes the target of the operation.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AcceptSelfSignedCertificate</maml:name><maml:description><maml:para>Forces the cmdlet to automatically accept the SQL Server Cloud Adapter self-signed certificate of the target machine without prompting the user.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases=""><maml:name>Credential</maml:name><maml:description><maml:para>Specifies a user account with Windows Administrator credentials on the target machine.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue><dev:type><maml:name>PSCredential</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="named" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The server object of the target instance.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">Server[]</command:parameterValue><dev:type><maml:name>Server[]</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ManagementPublicPort</maml:name><maml:description><maml:para>The public management port on the target machine. This parameter should be used when the ports of the target machine are not directly accessible but are exposed through endpoints, which means that we need to connect to a different port.</maml:para><maml:para>SQL Server Cloud Adapter must be accessible by this port.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the instance of SQL Server on which you want to execute the operation. This is an optional parameter. If not specified, the value of this parameter defaults to the current working 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>RetryTimeout</maml:name><maml:description><maml:para>The time period to retry the command on the target sever. After the timeout expires, no retry will be attempted.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Int32</command:parameterValue><dev:type><maml:name>Int32</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue, ByPropertyName)" position="named" aliases=""><maml:name>ServerInstance</maml:name><maml:description><maml:para>This parameter specifies the name of an instance of SQL Server that becomes the target of the operation.</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" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;CD SQLSERVER:\SQL\Computer\Instance;
Stop-SqlInstance -Credential $credential -AcceptSelfSignedCertificate;

</dev:code><dev:remarks><maml:para>This command stops the server instance ‘Computer\Instance’. The current working directory is used to determine the server instance where the operation should occur. The self-signed certificate of the target machine will be automatically accepted without prompting the user.</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title></maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>This command retrieves all instances of SQL Server on the machine ‘MachineName’ and stops all the instances. The self-signed certificate of the target machine will be automatically accepted without prompting the user.
PS C:\&gt;Get-SqlInstance -Credential $credential -MachineName "MachineName"  | Stop-SqlInstance -Credential $credential -AcceptSelfSignedCertificate;

</dev:code><dev:remarks><maml:para></maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Suspend-SqlAvailabilityDatabase</command:name><maml:description><maml:para>Suspends data movement on an availability database on the replica hosted by the current server instance. </maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Suspend</command:verb><command:noun>SqlAvailabilityDatabase</command:noun><dev:version /></command:details><maml:description><maml:para>The Suspend-SqlAvailabilityDatabase cmdlet suspends data movement on an availability database on the replica that is hosted by the current server instance. When a secondary database is suspended, its state is set to SUSPENDED and it will being to fall behind the corresponding primary database. Suspending a primary database suspends data movement on every secondary replica.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Suspend-SqlAvailabilityDatabase</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability database.  This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Suspend-SqlAvailabilityDatabase</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityDatabase object of the primary or secondary database for which data movement is to be suspended.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityDatabase object of the primary or secondary database for which data movement is to be suspended.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability database.  This is an optional parameter. If not specified, the value of this parameter defaults to the current working 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityDatabase</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>

Specifies the availability database for which data movement is to be suspended.


</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><maml:alertSet><maml:title /><maml:alert><maml:para>The instance on which this command is executed must be enabled for high availability.
</maml:para></maml:alert><maml:alert></maml:alert></maml:alertSet><command:examples><command:example><maml:title> 
 
-------------------------- EXAMPLE 1 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Suspend-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command suspends data synchronization for the availability database 'MyDatabase' in the availability group 'MyAg' on the server instance named 'Computer\Instance'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 2 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;dir SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityDatabases | Suspend-SqlAvailabilityDatabase


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command suspends data synchronization for all availability databases in the availability group 'MyAg' on the server instance named 'Computer\Instance'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 3 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Suspend-SqlAvailabilityDatabase -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityDatabases\MyDatabase -Script


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command outputs the Transact-SQL script that suspends data synchronization for the availability database 'MyDatabase' in the availability group 'MyAg' on the server instance named 'Computer\Instance'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Suspending a Database in an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Switch-SqlAvailabilityGroup</command:name><maml:description><maml:para>Initiates a failover of an availability group to a specific secondary replica.  </maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Switch</command:verb><command:noun>SqlAvailabilityGroup</command:noun><dev:version /></command:details><maml:description><maml:para>The Switch-SqlAvailabilityGroup cmdlet initiates a failover of an availability group to a specific secondary replica.  This cmdlet can be executed only on the target secondary replica. After the failover, the secondary replica to which you failed over becomes the new primary replica.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Switch-SqlAvailabilityGroup</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowDataLoss</maml:name><maml:description><maml:para>Initiates a forced failover to the target secondary replica.  Data loss is possible. Therefore, you will be prompted for confirmation unless you specify the -Force or -Script parameter.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>Specify -Force with -AllowDataLoss to initiate a forced failover without confirmation.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Switch-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityGroup object representing the availability group that will be failed over.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowDataLoss</maml:name><maml:description><maml:para>Initiates a forced failover to the target secondary replica.  Data loss is possible. Therefore, you will be prompted for confirmation unless you specify the -Force or -Script parameter.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>Specify -Force with -AllowDataLoss to initiate a forced failover without confirmation.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowDataLoss</maml:name><maml:description><maml:para>Initiates a forced failover to the target secondary replica.  Data loss is possible. Therefore, you will be prompted for confirmation unless you specify the -Force or -Script parameter.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Force</maml:name><maml:description><maml:para>Specify -Force with -AllowDataLoss to initiate a forced failover without confirmation.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>The AvailabilityGroup object representing the availability group that will be failed over.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group. This is an optional parameter. If not specified, the value of this parameter defaults to the current working 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>Script</maml:name><maml:description><maml:para>Outputs a Transact-SQL script that performs the task executed by this cmdlet.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>

Specifies the availability group to fail over to.


</maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title> 
 
-------------------------- EXAMPLE 1 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Switch-SqlAvailabilityGroup -Path SQLSERVER:\Sql\SecondaryServer\InstanceName\AvailabilityGroups\MyAg


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command performs a planned manual failover (without data loss) of the availability group 'MyAg' to the server instance named 'SecondaryServer\InstanceName'. This command must be executed against the server instance that hosts the secondary replica to which you are failing over.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 2 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Switch-SqlAvailabilityGroup -Path SQLSERVER:\Sql\SecondaryServer\InstanceName\AvailabilityGroups\MyAg -AllowDataLoss


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command performs a forced failover (with possible data loss) of the availability group 'MyAg' to the server instance named 'SecondaryServer\InstanceName'. Because a forced failover might result in data loss, you will be prompted to confirm this operation. This command must be executed against the server instance that hosts the secondary replica to which you are failing over.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 3 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Switch-SqlAvailabilityGroup -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\AgName -AllowDataLoss -Force


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command performs a forced failover (with possible data loss) of the availability group 'MyAg' to the server instance named 'SecondaryServer\InstanceName'. The -Force option suppresses confirmation of this operation. Use the -Force option with caution, because a forced failover might result in the loss of data from databases participating the availability group. This command must be executed against the server instance that hosts the secondary replica to which you are failing over.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title> 
 
-------------------------- EXAMPLE 4 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Switch-SqlAvailabilityGroup -Path SQLSERVER:\Sql\SecondaryServer\InstanceName\AvailabilityGroups\MyAg -Script


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command outputs the Transact-SQL script that performs a planned manual failover of the availability group 'MyAg' to the server instance named 'SecondaryServer\InstanceName'. Note that this command does not cause a failover.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>SQL Server Books Online: Forcing Failover of an Availability Group (SQL Server)</maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Test-SqlAvailabilityGroup</command:name><maml:description><maml:para>Evaluates the health of an availability group by evaluating SQL Server policy based management (PBM) policies.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Test</command:verb><command:noun>SqlAvailabilityGroup</command:noun><dev:version /></command:details><maml:description><maml:para>The Test-SqlAvailabilityGroup cmdlet assesses the health of an availability group by evaluating SQL Server policy based management (PBM) policies. You must have CONNECT, VIEW SERVER STATE, and VIEW ANY DEFINITION permissions to execute this cmdlet.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-SqlAvailabilityGroup</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>Runs user policies found in the AlwaysOn policy categories.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>When this parameter is set, the cmdlet will not manually refresh the objects specified by the -Path or -InputObject parameter.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>Shows the result of each policy evaluation performed by this cmdlet. The cmdlet outputs one object per policy evaluation, and this object has fields describing the results of evaluation (whether the policy passed or not, the policy name and category, and so forth).
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Test-SqlAvailabilityGroup</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of objects representing availability groups. This cmdlet will compute the health of these availability groups.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>Runs user policies found in the AlwaysOn policy categories.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>When this parameter is set, the cmdlet will not manually refresh the objects specified by the -Path or -InputObject parameter.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>Shows the result of each policy evaluation performed by this cmdlet. The cmdlet outputs one object per policy evaluation, and this object has fields describing the results of evaluation (whether the policy passed or not, the policy name and category, and so forth).
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>Runs user policies found in the AlwaysOn policy categories.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of objects representing availability groups. This cmdlet will compute the health of these availability groups.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>When this parameter is set, the cmdlet will not manually refresh the objects specified by the -Path or -InputObject parameter.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the availability group. This is an optional parameter. If not specified, the value of this parameter defaults to the current working 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>Shows the result of each policy evaluation performed by this cmdlet. The cmdlet outputs one object per policy evaluation, and this object has fields describing the results of evaluation (whether the policy passed or not, the policy name and category, and so forth).
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>



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



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Test-SqlAvailabilityGroup -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command evaluates the health of the availability group named 'MyAg' and outputs a brief summary.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 2 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups | Test-SqlAvailabilityGroup


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command evaluates the health of all availability groups on the server instance 'Computer\Instance' and outputs a brief summary for each availability group.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 3 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Test-SqlAvailabilityGroup -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\AgName -ShowPolicyDetails


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command evaluates the health of the availability group named 'MyAg' and outputs the evaluation results for each policy-based management (PBM) policy that was executed.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 4 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Test-SqlAvailabilityGroup -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\AgName -AllowUserPolicies


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command evaluates the health of the availability group named 'MyAg'. User-defined policies are included in this evaluation.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 5 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups | Test-SqlAvailabilityGroup | Where-Object { $_.HealthState -eq "Error" }


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command shows all availability groups with a health state of "Error" on the server instance 'Computer\Instance'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Test-SqlAvailabilityReplica</command:name><maml:description><maml:para>Evaluates the health of availability replicas by evaluating SQL Server policy based management (PBM) policies.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Test</command:verb><command:noun>SqlAvailabilityReplica</command:noun><dev:version /></command:details><maml:description><maml:para>The Test-SqlAvailabilityReplica cmdlet assesses the health of availability replicas by evaluating SQL Server policy based management (PBM) policies. You must have CONNECT, VIEW SERVER STATE, and VIEW ANY DEFINITION permissions to execute this cmdlet.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-SqlAvailabilityReplica</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The paths to one or more availability replicas. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>Runs user policies found in the AlwaysOn policy categories.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>When this parameter is set, the cmdlet will not manually refresh the objects specified by the -Path or -InputObject parameter.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>Shows the result of each policy evaluation performed by this cmdlet. The cmdlet outputs one object per policy evaluation, and this object has fields describing the results of evaluation (whether the policy passed or not, the policy name and category, and so forth).
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Test-SqlAvailabilityReplica</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of objects representing availability replicas. This cmdlet will compute the health of these replicas.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>Runs user policies found in the AlwaysOn policy categories.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>When this parameter is set, the cmdlet will not manually refresh the objects specified by the -Path or -InputObject parameter.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>Shows the result of each policy evaluation performed by this cmdlet. The cmdlet outputs one object per policy evaluation, and this object has fields describing the results of evaluation (whether the policy passed or not, the policy name and category, and so forth).
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>Runs user policies found in the AlwaysOn policy categories.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of objects representing availability replicas. This cmdlet will compute the health of these replicas.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>When this parameter is set, the cmdlet will not manually refresh the objects specified by the -Path or -InputObject parameter.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The paths to one or more availability replicas. This is an optional parameter. If not specified, the value of this parameter defaults to the current working 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>Shows the result of each policy evaluation performed by this cmdlet. The cmdlet outputs one object per policy evaluation, and this object has fields describing the results of evaluation (whether the policy passed or not, the policy name and category, and so forth).
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityReplica</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>



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



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Test-SqlAvailabilityReplica -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command evaluates the health of the availability replica named 'MyReplica' in the availability group 'MyAg' and outputs a brief summary.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 2 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityReplicas | Test-SqlAvailabilityReplica


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command evaluates the health of all availability replicas in the availability group 'MyAg' and outputs a brief summary for each replica.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 3 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Test-SqlAvailabilityReplica -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica -ShowPolicyDetails


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command evaluates the health of the availability replica named 'MyReplica' in the availability group 'MyAg' and outputs the evaluation results for each policy-based management (PBM) policy that was executed.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 4 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Test-SqlAvailabilityReplica -Path SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityReplicas\MyReplica -AllowUserPolicies


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command evaluates the health of the availability replica named 'MyReplica' in the availability group 'MyAg'. User-defined policies are included in this evaluation.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 5 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\AvailabilityReplicas | Test-SqlAvailabilityReplica | Where-Object { $_.HealthState -eq "Error" }


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command shows all availability replicas with a health state of "Error" in the availability group 'MyAg'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Test-SqlDatabaseReplicaState</command:name><maml:description><maml:para>Evaluates the health of an availability database on all joined availability replicas by evaluating SQL Server policy-based management (PBM) policies.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Test</command:verb><command:noun>SqlDatabaseReplicaState</command:noun><dev:version /></command:details><maml:description><maml:para>The Test-SqlDatabaseReplicaState cmdlet assesses the health of an availability database on all joined availability replicas by evaluating SQL Server policy based management (PBM) policies. You must have CONNECT, VIEW SERVER STATE, and VIEW ANY DEFINITION permissions to execute this cmdlet.
</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-SqlDatabaseReplicaState</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the database replica cluster state of the availability database. This is an optional parameter. If not specified, the value of this parameter defaults to the current working location.
</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>Runs user policies found in the AlwaysOn policy categories.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>When this parameter is set, the cmdlet will not manually refresh the objects specified by the -Path or -InputObject parameter.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>Shows the result of each policy evaluation performed by this cmdlet. The cmdlet outputs one object per policy evaluation, and this object has fields describing the results of evaluation (whether the policy passed or not, the policy name and category, and so forth).
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Test-SqlDatabaseReplicaState</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of objects representing availability database states. This cmdlet will compute the health of these availability databases.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>Runs user policies found in the AlwaysOn policy categories.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>When this parameter is set, the cmdlet will not manually refresh the objects specified by the -Path or -InputObject parameter.
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>Shows the result of each policy evaluation performed by this cmdlet. The cmdlet outputs one object per policy evaluation, and this object has fields describing the results of evaluation (whether the policy passed or not, the policy name and category, and so forth).
</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>Runs user policies found in the AlwaysOn policy categories.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>A collection of objects representing availability database states. This cmdlet will compute the health of these availability databases.
</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>When this parameter is set, the cmdlet will not manually refresh the objects specified by the -Path or -InputObject parameter.
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path to the database replica cluster state of the availability database. This is an optional parameter. If not specified, the value of this parameter defaults to the current working 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>Shows the result of each policy evaluation performed by this cmdlet. The cmdlet outputs one object per policy evaluation, and this object has fields describing the results of evaluation (whether the policy passed or not, the policy name and category, and so forth).
</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.DatabaseReplicaState</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>



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



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;$path = "SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\DatabaseReplicaStates\MyReplica.MyDatabase"
Test-SqlDatabaseReplicaState -Path $path


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command evaluates the health of the availability database named 'MyDatabase' on the availability replica 'MyReplica' in the availability group 'MyAg' and outputs a brief summary.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 2 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\DatabaseReplicaStates | Test-SqlDatabaseReplicaState


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command evaluates the health of all availability databases in the availability group 'MyAg' and outputs a brief summary for each database.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 3 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;dir SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\DatabaseReplicaStates | Test-SqlDatabaseReplicaState -ShowPolicyDetails


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command evaluates the health of all availability databases in the availability group 'MyAg' and outputs the evaluation results for each policy-based management (PBM) policy that was executed.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 4 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;dir SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\DatabaseReplicaStates | Test-SqlDatabaseReplicaState -AllowUserPolicies


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command evaluates the health of all availability databases in the availability group 'MyAg'. User-defined policies are included in this evaluation.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>



				-------------------------- EXAMPLE 5 --------------------------



			</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\PS&gt;Get-ChildItem SQLSERVER:\Sql\Computer\Instance\AvailabilityGroups\MyAg\DatabaseReplicaStates | Test-SqlDatabaseReplicaState | Where-Object { $_.HealthState -eq "Error" }


</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command shows all availability databases with a health state of "Error" in the availability group 'MyAg'.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText></maml:linkText><maml:uri /></maml:navigationLink></maml:relatedLinks></command:command><command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"><command:details><command:name>Test-SqlSmartAdmin</command:name><maml:description><maml:para>This cmdlet assesses the health of Smart Admin by evaluating SQL Server policy based management (PBM) policies.</maml:para></maml:description><maml:copyright><maml:para /></maml:copyright><command:verb>Test</command:verb><command:noun>SqlSmartAdmin</command:noun><dev:version /></command:details><maml:description><maml:para>The Test-SqlSmartAdmin cmdlet assesses the health of Smart Admin for the SQL Server instance. </maml:para><maml:para>The Test-SqlSmartAdmin cmdlet assesses the health of Smart Admin for the SQL Server instance. This cmdlet supports the following modes of operation to return the object: 

 1. Pass the path of the instance of SQL Server to the -Path parameter.


2. Pass a Smo.Server object to the -InputObject parameter, either directly or through the pipeline.</maml:para></maml:description><command:syntax><command:syntaxItem><maml:name>Test-SqlSmartAdmin</maml:name><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path of the SQL Server Instance. This is an optional parameter.  If not, specified, the value of this parameter uses the current working location.</maml:para></maml:description><command:parameterValue required="true" variableLength="true">String[]</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>Runs user policies found in the Smart Admin warning and error policy categories.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>When this parameter is set, the cmdlet will not manually refresh the object specified by the Path or InputObject parameter.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>Shows the result of the policy assessment performed by this cmdlet. The cmdlet outputs one object per policy assessment. The output includes the results of the assessment: such as the name of the policy, category, and health.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem><command:syntaxItem><maml:name>Test-SqlSmartAdmin</maml:name><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>A SmartAdmin object. You can get this object from Get-SqlSmartAdmin cmdlet.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>Runs user policies found in the Smart Admin warning and error policy categories.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>When this parameter is set, the cmdlet will not manually refresh the object specified by the Path or InputObject parameter.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>Shows the result of the policy assessment performed by this cmdlet. The cmdlet outputs one object per policy assessment. The output includes the results of the assessment: such as the name of the policy, category, and health.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description></command:parameter></command:syntaxItem></command:syntax><command:parameters><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>AllowUserPolicies</maml:name><maml:description><maml:para>Runs user policies found in the Smart Admin warning and error policy categories.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="true" variableLength="false" globbing="false" pipelineInput="True (ByValue)" position="2" aliases=""><maml:name>InputObject</maml:name><maml:description><maml:para>A SmartAdmin object. You can get this object from Get-SqlSmartAdmin cmdlet.</maml:para></maml:description><command:parameterValue required="true" variableLength="false">Target</command:parameterValue><dev:type><maml:name>Target</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>NoRefresh</maml:name><maml:description><maml:para>When this parameter is set, the cmdlet will not manually refresh the object specified by the Path or InputObject parameter.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="2" aliases=""><maml:name>Path</maml:name><maml:description><maml:para>The path of the SQL Server Instance. This is an optional parameter.  If not, specified, the value of this parameter uses the current working 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" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases=""><maml:name>ShowPolicyDetails</maml:name><maml:description><maml:para>Shows the result of the policy assessment performed by this cmdlet. The cmdlet outputs one object per policy assessment. The output includes the results of the assessment: such as the name of the policy, category, and health.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue></dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>Confirm</maml:name><maml:description><maml:para>Prompts you for confirmation before executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter><command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false" position="named"><maml:name>WhatIf</maml:name><maml:description><maml:para>Describes what would happen if you executed the cmdlet without actually executing the cmdlet.</maml:para></maml:description><command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue><dev:type><maml:name>SwitchParameter</maml:name><maml:uri /></dev:type><dev:defaultValue>false</dev:defaultValue></command:parameter></command:parameters><command:inputTypes><command:inputType><dev:type><maml:name>Microsoft.SqlServer.Management.Smo.SmartAdmin</maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para></maml:para></maml:description></command:inputType></command:inputTypes><command:returnValues><command:returnValue><dev:type><maml:name></maml:name><maml:uri></maml:uri><maml:description><maml:para /></maml:description></dev:type><maml:description><maml:para>The output is the results from the evaluation of the policies.</maml:para></maml:description></command:returnValue></command:returnValues><command:terminatingErrors /><command:nonTerminatingErrors /><command:examples><command:example><maml:title>
 
-------------------------- EXAMPLE 1 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\ PS&gt; cd SQLSERVER:\SQL\Computer\MyInstance 
 Get-SqlSmartAdmin | Test-SqlSmartAdmin
Following is a list of the properties returned by the above command :
Name: Displays the name of the policy.
Category: Displays the category of the policy, SmartAdmin errors or SmartAdmin Warnings.
Result: Whether a result was returned or not (True or False) 
Expression: Displays the policy conditions.  
</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command assesses the health of the databases on server instance ‘MyInstance’ and outputs the health status. It uses the Get-SqlSmartAdmin cmdlet to retrieve the Smart Admin object and pipes it to the Test-SqlSmartAdmin cmdlet to use.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
-------------------------- EXAMPLE 2 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>C:\ PS&gt; cd SQLSERVER:\SQL\Computer\MyInstance 
 $policyResults = Get-SqlSmartAdmin | Test-SqlSmartAdmin 
$policyResults.PolicyEvaluationDetails | select Name, Category, Result, Expression|f1

</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command assesses the health of the databases on server instance ‘MyInstance’ and outputs the status and filters the display. It uses the Get-SqlSmartAdmin cmdlet to retrieve the Smart Admin object and pipes it to the Test-SqlSmartAdmin cmdlet to use.
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example><command:example><maml:title>
 
-------------------------- EXAMPLE 3 -------------------------- 
 
</maml:title><maml:introduction><maml:para></maml:para></maml:introduction><dev:code>PS C:\&gt;PS SQLSERVER:\SQL\COMPUTER\DEFAULT&gt; (get-sqlsmartadmin ).EnumHealthStatus()
Following is a sample output generated by using the above example: number_of_storage_connectivity_errors: 0 
number_of_sql_errors: 2 
number_of_invalid_credential_errors: 0 
number_of_other_errors : 0 
number_of_corrupted_or_deleted_backups: 0 
number_of_backup_loops: 2 
number_of_retention_loops: 2

</dev:code><dev:remarks><maml:para>Description
</maml:para><maml:para>-----------
</maml:para><maml:para>This command provides a detailed report on the error returned on the default instance:
</maml:para></dev:remarks><command:commandLines><command:commandLine><command:commandText /></command:commandLine></command:commandLines></command:example></command:examples><maml:relatedLinks><maml:navigationLink><maml:linkText>Online Version:</maml:linkText><maml:uri></maml:uri></maml:navigationLink></maml:relatedLinks></command:command></helpItems>
