en-US/SqlServerAlwaysOnTools-Help.xml
|
<?xml version="1.0" encoding="utf-8"?>
<helpItems xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" schema="maml" xmlns="http://msh"> <command:command> <command:details> <command:name>Add-SmoAvailabilityDatabase</command:name> <maml:description> <maml:para>Add database to Availability Group.</maml:para> </maml:description> <command:verb>Add</command:verb> <command:noun>SmoAvailabilityDatabase</command:noun> </command:details> <maml:description> <maml:para>Add database to Availability Group.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Add-SmoAvailabilityDatabase </maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="SqlServer"> <maml:name>ServerInstance</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>WhatIf</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Confirm</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Add-SmoAvailabilityDatabase </maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>AvailabilityGroupObject</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">AvailabilityGroup</command:parameterValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>WhatIf</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Confirm</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description> <maml:para>Name of Availability Group.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>AvailabilityGroupObject</maml:name> <maml:description> <maml:para>SQL Server Availability Group Object.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup</command:parameterValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>Name of database.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="SqlServer"> <maml:name>ServerInstance</maml:name> <maml:description> <maml:para>The name of the SQL Server instance to connect to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:description> <maml:para>Runs the command in a mode that only reports what would happen without performing the actions.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityDatabase</maml:name> </dev:type> <maml:description> <maml:para /> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para /> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>Add-SmoAvailabilityDatabase -ServerInstance MyServer -AvailabilityGroupName MyAG -DatabaseName AdventureWorks</dev:code> <dev:remarks> <maml:para>Add AdventureWorks database to MyAG availability group.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>--------- Example 2 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>$AGObject = Get-SmoAvailabilityGroup -ServerInstance MyServer -AvailabilityGroupName MyAG Add-SmoAvailabilityDatabase -AvailabilityGroupObject $AGObject -DatabaseName AdventureWorks</dev:code> <dev:remarks> <maml:para>Add AdventureWorks database using availability group object.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri>https://github.com/netsec4u/SqlServerAlwaysOnTools/blob/main/docs/Add-SmoAvailabilityDatabase.md</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Get-SmoAvailabilityDatabase</command:name> <maml:description> <maml:para>Retrieves information about a SQL Server availability database.</maml:para> </maml:description> <command:verb>Get</command:verb> <command:noun>SmoAvailabilityDatabase</command:noun> </command:details> <maml:description> <maml:para>Retrieves information about a SQL Server availability database. The cmdlet can be used to get details about the availability database, such as its name, state, and role within the availability group.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-SmoAvailabilityDatabase </maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="SqlServer"> <maml:name>ServerInstance</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-SmoAvailabilityDatabase </maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>SmoServerObject</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">Server</command:parameterValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.Server</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description> <maml:para>The name of the availability group to which the availability database belongs.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>The name of the availability database to retrieve.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="SqlServer"> <maml:name>ServerInstance</maml:name> <maml:description> <maml:para>The name of the SQL Server instance to connect to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>SmoServerObject</maml:name> <maml:description> <maml:para>The SMO Server object representing the SQL Server instance to connect to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Server</command:parameterValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.Server</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityDatabase</maml:name> </dev:type> <maml:description> <maml:para /> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para /> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>Get-SmoAvailabilityDatabase -ServerInstance "MyServer" -AvailabilityGroupName "MyAG"</dev:code> <dev:remarks> <maml:para>Gets all availability databases in the availability group "MyAG" on the SQL Server instance "MyServer".</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>--------- Example 2 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>$SmoServer = Connect-SmoServer -ServerInstance "MyServer" Get-SmoAvailabilityDatabase -SmoServerObject $SmoServer -AvailabilityGroupName "MyAG" -DatabaseName "MyDB"</dev:code> <dev:remarks> <maml:para>Gets the availability database named "MyDB" in the availability group "MyAG" on the SQL Server instance represented by the SMO Server object.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri>https://github.com/netsec4u/SqlServerAlwaysOnTools/blob/main/docs/Get-SmoAvailabilityDatabase.md</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Get-SmoAvailabilityDatabaseReplicaState</command:name> <maml:description> <maml:para>Get availability group database replica state information.</maml:para> </maml:description> <command:verb>Get</command:verb> <command:noun>SmoAvailabilityDatabaseReplicaState</command:noun> </command:details> <maml:description> <maml:para>Get availability group database replica status information.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-SmoAvailabilityDatabaseReplicaState </maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>ServerInstance</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-SmoAvailabilityDatabaseReplicaState </maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>SmoServerObject</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">Server</command:parameterValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.Server</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description> <maml:para>Specifies availability group name.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>Specifies the name of the database to gather status information.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>ServerInstance</maml:name> <maml:description> <maml:para>The name of the SQL Server instance to connect to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>SmoServerObject</maml:name> <maml:description> <maml:para>An existing SMO Server object representing the SQL Server instance.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Server</command:parameterValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.Server</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.DatabaseReplicaState</maml:name> </dev:type> <maml:description> <maml:para /> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para /> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>Get-SmoAvailabilityDatabaseReplicaState -ServerInstance .</dev:code> <dev:remarks> <maml:para>Get availability group database replica state for all databases.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>--------- Example 2 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>Get-SmoAvailabilityDatabaseReplicaState -ServerInstance . -DatabaseName AdventureWorks</dev:code> <dev:remarks> <maml:para>Get availability group database replica state for AdventureWorks database.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>--------- Example 3 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>$SqlConnection = Connect-SqlServerInstance -ServerInstance . -DatabaseName master Get-SmoAvailabilityDatabaseReplicaState -SqlConnection $SqlConnection -DatabaseName AdventureWorks</dev:code> <dev:remarks> <maml:para>Get availability group database replica state for AdventureWorks database.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri>https://github.com/netsec4u/SqlServerAlwaysOnTools/blob/main/docs/Get-SmoAvailabilityDatabaseReplicaState.md</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Get-SmoAvailabilityGroup</command:name> <maml:description> <maml:para>Get SQL Availability Group.</maml:para> </maml:description> <command:verb>Get</command:verb> <command:noun>SmoAvailabilityGroup</command:noun> </command:details> <maml:description> <maml:para>Get SQL Availability Group.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-SmoAvailabilityGroup </maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="SqlServer"> <maml:name>ServerInstance</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-SmoAvailabilityGroup </maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>SmoServerObject</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">Server</command:parameterValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.Server</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description> <maml:para>Name of Availability Group.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="SqlServer"> <maml:name>ServerInstance</maml:name> <maml:description> <maml:para>The name of the SQL Server instance to connect to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>SmoServerObject</maml:name> <maml:description> <maml:para>An existing SMO Server object representing the SQL Server instance.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Server</command:parameterValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.Server</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name> </dev:type> <maml:description> <maml:para /> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para /> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>Get-SmoAvailabilityGroup -ServerInstance MyServer</dev:code> <dev:remarks> <maml:para>Lists availability groups on MyServer sql instance.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>--------- Example 2 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>$SmoServerObject = Connect-SmoServer -ServerInstance . Get-SmoAvailabilityGroup -SmoServerObject $SmoServerObject -AvailabilityGroupName MyAG</dev:code> <dev:remarks> <maml:para>Lists MyAG availability group from the local SQL Server instance using a SMO Server object.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri>https://github.com/netsec4u/SqlServerAlwaysOnTools/blob/main/docs/Get-SmoAvailabilityGroup.md</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Get-SmoAvailabilityGroupListener</command:name> <maml:description> <maml:para>Get SQL Availability Group listeners.</maml:para> </maml:description> <command:verb>Get</command:verb> <command:noun>SmoAvailabilityGroupListener</command:noun> </command:details> <maml:description> <maml:para>Get SQL Availability Group listeners.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-SmoAvailabilityGroupListener </maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>ServerInstance</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-SmoAvailabilityGroupListener </maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>SmoServerObject</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">Server</command:parameterValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.Server</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description> <maml:para>Name of Availability Group.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>ServerInstance</maml:name> <maml:description> <maml:para>The name of the SQL Server instance to connect to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>SmoServerObject</maml:name> <maml:description> <maml:para>An existing SMO Server object representing the SQL Server instance.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Server</command:parameterValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.Server</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroupListener</maml:name> </dev:type> <maml:description> <maml:para /> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para /> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>Get-SmoAvailabilityGroupListener -ServerInstance MyServer</dev:code> <dev:remarks> <maml:para>Lists availability group listeners on MyServer.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>--------- Example 2 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>$SmoServerObject = Connect-SmoServer -ServerInstance . Get-SmoAvailabilityGroupListener -SmoServerObject $SmoServerObject -AvailabilityGroupName MyAG</dev:code> <dev:remarks> <maml:para>Lists MyAG availability group listeners from the local SQL Server instance using a SMO Server object.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri>https://github.com/netsec4u/SqlServerAlwaysOnTools/blob/main/docs/Get-SmoAvailabilityGroupListener.md</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Get-SmoAvailabilityGroupSeedingStatus</command:name> <maml:description> <maml:para>Get availability group seeding status information.</maml:para> </maml:description> <command:verb>Get</command:verb> <command:noun>SmoAvailabilityGroupSeedingStatus</command:noun> </command:details> <maml:description> <maml:para>Get availability group seeding status information.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-SmoAvailabilityGroupSeedingStatus </maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>ServerInstance</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-SmoAvailabilityGroupSeedingStatus </maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>SqlConnection</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">SqlConnection</command:parameterValue> <dev:type> <maml:name>Microsoft.Data.SqlClient.SqlConnection</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>Specifies the name of the database to gather status information.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>ServerInstance</maml:name> <maml:description> <maml:para>The name of the SQL Server instance to connect to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>SqlConnection</maml:name> <maml:description> <maml:para>An open SQL Client Connection object.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">Microsoft.Data.SqlClient.SqlConnection</command:parameterValue> <dev:type> <maml:name>Microsoft.Data.SqlClient.SqlConnection</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Data.DataRow</maml:name> </dev:type> <maml:description> <maml:para /> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para /> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>Get-SmoAvailabilityGroupSeedingStatus -ServerInstance .</dev:code> <dev:remarks> <maml:para>Get availability group seeding status for all databases.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>--------- Example 2 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>Get-SmoAvailabilityGroupSeedingStatus -ServerInstance . -DatabaseName AdventureWorks</dev:code> <dev:remarks> <maml:para>Get availability group seeding status for AdventureWorks database.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>--------- Example 3 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>$SqlConnection = Connect-SqlServerInstance -ServerInstance . -DatabaseName master Get-SmoAvailabilityGroupSeedingStatus -SqlConnection $SqlConnection -DatabaseName AdventureWorks</dev:code> <dev:remarks> <maml:para>Get availability group seeding status for AdventureWorks database.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri>https://github.com/netsec4u/SqlServerAlwaysOnTools/blob/main/docs/Get-SmoAvailabilityGroupSeedingStatus.md</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Move-SqlAvailabilityGroup</command:name> <maml:description> <maml:para>Starts a failover of an availability group to a secondary replica.</maml:para> </maml:description> <command:verb>Move</command:verb> <command:noun>SqlAvailabilityGroup</command:noun> </command:details> <maml:description> <maml:para>Starts a failover of an availability group to a specified secondary replica. Run this cmdlet on the target secondary replica.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Move-SqlAvailabilityGroup </maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>ServerInstance</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>AllowDataLoss</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>WhatIf</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Confirm</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Move-SqlAvailabilityGroup </maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>SmoServerObject</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">Server</command:parameterValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.Server</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>AllowDataLoss</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>WhatIf</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Confirm</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>AllowDataLoss</maml:name> <maml:description> <maml:para>Specifies to allow data loss in failover.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description> <maml:para>Name of Availability Group.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>ServerInstance</maml:name> <maml:description> <maml:para>The name of the SQL Server instance to connect to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>SmoServerObject</maml:name> <maml:description> <maml:para>An existing SMO Server object representing the SQL Server instance.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.Server</command:parameterValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.Server</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:description> <maml:para>Runs the command in a mode that only reports what would happen without performing the actions.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Void</maml:name> </dev:type> <maml:description> <maml:para /> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para /> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>Move-SqlAvailabilityGroup -ServerInstance MyServer -AvailabilityGroupName MyAG</dev:code> <dev:remarks> <maml:para>Failover primary replica to MyServer in the MyAg availability group.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>--------- Example 2 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>$SmoServerObject = Connect-SmoServer -ServerInstance MyServer Move-SqlAvailabilityGroup -SmoServerObject $SmoServerObject -AvailabilityGroupName MyAG</dev:code> <dev:remarks> <maml:para>Failover primary replica to MyServer in the MyAg availability group using a SMO Server object.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri>https://github.com/netsec4u/SqlServerAlwaysOnTools/blob/main/docs/Move-SqlAvailabilityGroup.md</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Remove-SmoAvailabilityDatabase</command:name> <maml:description> <maml:para>Remove database from Availability Group.</maml:para> </maml:description> <command:verb>Remove</command:verb> <command:noun>SmoAvailabilityDatabase</command:noun> </command:details> <maml:description> <maml:para>Remove database from Availability Group.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Remove-SmoAvailabilityDatabase </maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="SqlServer"> <maml:name>ServerInstance</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>RemoveReplicaDatabase</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>WhatIf</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Confirm</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Remove-SmoAvailabilityDatabase </maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>AvailabilityGroupObject</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">AvailabilityGroup</command:parameterValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>RemoveReplicaDatabase</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>WhatIf</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Confirm</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>AvailabilityGroupName</maml:name> <maml:description> <maml:para>Name of Availability Group.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>AvailabilityGroupObject</maml:name> <maml:description> <maml:para>SQL Server Availability Group Object.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">Microsoft.SqlServer.Management.Smo.AvailabilityGroup</command:parameterValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>DatabaseName</maml:name> <maml:description> <maml:para>Name of database.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>RemoveReplicaDatabase</maml:name> <maml:description> <maml:para>Remove database from Availability replicas.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="SqlServer"> <maml:name>ServerInstance</maml:name> <maml:description> <maml:para>The name of the SQL Server instance to connect to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:description> <maml:para>Runs the command in a mode that only reports what would happen without performing the actions.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>Microsoft.SqlServer.Management.Smo.AvailabilityGroup</maml:name> </dev:type> <maml:description> <maml:para /> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para /> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>Remove-SmoAvailabilityDatabase -ServerInstance MyServer -AvailabilityGroupName MyAG -DatabaseName AdventureWorks</dev:code> <dev:remarks> <maml:para>Removes AdventureWorks database from availability group.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>--------- Example 2 ---------</maml:title> <maml:introduction> </maml:introduction> <dev:code>$AGObject = Get-SmoAvailabilityGroup -ServerInstance AZ-SQL-P01-N01 -AvailabilityGroupName AZ-SQL-P01-A01 Remove-SmoAvailabilityDatabase -AvailabilityGroupObject $AGObject -DatabaseName AdventureWorks</dev:code> <dev:remarks> <maml:para>Removes AdventureWorks database from availability group using availability group object.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri>https://github.com/netsec4u/SqlServerAlwaysOnTools/blob/main/docs/Remove-SmoAvailabilityDatabase.md</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> </helpItems> |