Skip to content

Commit a66c7c7

Browse files
committed
Update Code Formatting
Updated the format of the code examples.
1 parent 162701e commit a66c7c7

File tree

1 file changed

+28
-16
lines changed

1 file changed

+28
-16
lines changed

docs/azure_data_studio/README_FOR_MARKETPLACE.md

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -105,28 +105,36 @@ For more information see the [Code of Conduct FAQ][conduct-FAQ] or contact [open
105105
## SQL PowerShell Examples
106106
In order to use these examples (below), you need to install the SqlServer module from the [PowerShell Gallery](https://www.powershellgallery.com/packages/SqlServer).
107107

108-
<pre><code>Install-Module -Name SqlServer -AllowPrerelease</code></pre>
108+
```
109+
Install-Module -Name SqlServer -AllowPrerelease
110+
```
111+
112+
In this example, we use the `Get-SqlInstance` cmdlet to Get the Server SMO objects for ServerA & ServerB. The default output for this command will include the Instance name, version, Service Pack, & CU Update Level of the instances.
109113

110-
In this example, we use the Get-SqlInstance cmdlet to Get the Server SMO objects for ServerA & ServerB. The default output for this command will include the Instance name, version, Service Pack, & CU Update Level of the instances.
114+
```
115+
Get-SqlInstance -ServerInstance ServerA, ServerB
116+
```
111117

112-
<pre><code>Get-SqlInstance -ServerInstance ServerA, ServerB</code></pre>
113118
Here is a sample of what that output will look like:
114-
<pre><code><# Sample Output #>
119+
120+
```
115121
Instance Name Version ProductLevel UpdateLevel
116122
------------- ------- ------------ -----------
117123
ServerA 13.0.5233 SP2 CU4
118-
ServerB 14.0.3045 RTM CU12</code></pre>
124+
ServerB 14.0.3045 RTM CU12
125+
```
119126

120-
In this example, we will do a 'dir' (alias for Get-ChildItem) to get the list of all SQL Server instances listed in your Registered Servers file, and then use the Get-SqlDatabase cmdlet to get a list of Databases for each of those instances.
127+
In this example, we will do a `dir` (alias for `Get-ChildItem`) to get the list of all SQL Server instances listed in your Registered Servers file, and then use the `Get-SqlDatabase` cmdlet to get a list of Databases for each of those instances.
121128

122-
<pre><code>dir 'SQLSERVER:\SQLRegistration\Database Engine Server Group' -Recurse |
129+
```
130+
dir 'SQLSERVER:\SQLRegistration\Database Engine Server Group' -Recurse |
123131
WHERE {$_.Mode -ne 'd' } |
124132
FOREACH {
125133
Get-SqlDatabase -ServerInstance $_.Name
126134
}
127-
</code></pre>
135+
```
128136
Here is a sample of what that output will look like:
129-
<pre><code>
137+
```
130138
Name Status Size Space Recovery Compat. Owner
131139
Available Model Level
132140
---- ------ ---- ---------- -------- ------- -----
@@ -139,18 +147,22 @@ PBIRSTempDB Normal 16.00 MB 4.20 MB Simple 140 sa
139147
SSISDB Normal 325.06 MB 26.21 MB Full 140 sa
140148
tempdb Normal 72.00 MB 61.25 MB Simple 140 sa
141149
WideWorldImporters Normal 3.2 GB 2.6 GB Simple 130 sa
142-
</code></pre>
150+
```
143151

144-
This example uses the Get-SqlDatabase cmdlet to retireve a list of all databases on the ServerB instance, then presents a grid/table to select which databases should be backed up. Once the user clicks on the "OK" button, only the highlighted databases will be backed up.
152+
This example uses the `Get-SqlDatabase` cmdlet to retireve a list of all databases on the ServerB instance, then presents a grid/table to select which databases should be backed up. Once the user clicks on the "OK" button, only the highlighted databases will be backed up.
145153

146-
<pre><code>Get-SqlDatabase -ServerInstance ServerB |
154+
```
155+
Get-SqlDatabase -ServerInstance ServerB |
147156
Out-GridView -PassThru |
148-
Backup-SqlDatabase -CompressionOption On</code></pre>
157+
Backup-SqlDatabase -CompressionOption On
158+
```
149159

150-
This example again gets list of all SQL Server instances listed in your Registered Servers file, then reports every failed SQL Agent Job since Midnight, for each SQL Server instances listed.
160+
This example again gets list of all SQL Server instances listed in your Registered Servers file, then calls the `Get-SqlAgentJobHistory` which reports every failed SQL Agent Job since Midnight, for each SQL Server instances listed.
151161

152-
<pre><code>dir 'SQLSERVER:\SQLRegistration\Database Engine Server Group' -Recurse |
162+
```
163+
dir 'SQLSERVER:\SQLRegistration\Database Engine Server Group' -Recurse |
153164
WHERE {$_.Mode -ne 'd' } |
154165
FOREACH {
155166
Get-SqlAgentJobHistory -ServerInstance $_.Name -Since Midnight -OutcomesType Failed
156-
}</code></pre>
167+
}
168+
```

0 commit comments

Comments
 (0)