Skip to content

Commit af15e85

Browse files
Apply suggestions from code review
Co-Authored-By: SQLvariant <SQLvariant@live.com>
1 parent 6d08212 commit af15e85

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/azure_data_studio/README_FOR_MARKETPLACE.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ code (Get-ChildItem $Home\.azuredatastudio\extensions\ms-vscode.PowerShell-*\exa
7878
### SQL PowerShell Examples
7979
In order to use these examples (below), you need to install the SqlServer module from the [PowerShell Gallery](https://www.powershellgallery.com/packages/SqlServer).
8080

81-
```
81+
```powershell
8282
Install-Module -Name SqlServer -AllowPrerelease
8383
```
8484

8585
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.
8686

87-
```
87+
```powershell
8888
Get-SqlInstance -ServerInstance ServerA, ServerB
8989
```
9090

@@ -99,12 +99,12 @@ ServerB 14.0.3045 RTM CU12
9999

100100
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.
101101

102-
```
102+
```powershell
103103
dir 'SQLSERVER:\SQLRegistration\Database Engine Server Group' -Recurse |
104104
WHERE { $_.Mode -ne 'd' } |
105105
FOREACH {
106-
Get-SqlDatabase -ServerInstance $_.Name
107-
}
106+
Get-SqlDatabase -ServerInstance $_.Name
107+
}
108108
```
109109

110110
Here is a sample of what that output will look like:
@@ -126,20 +126,20 @@ WideWorldImporters Normal 3.2 GB 2.6 GB Simple 130 sa
126126

127127
This example uses the `Get-SqlDatabase` cmdlet to retrieve a list of all databases on the ServerB instance, then presents a grid/table (using the `Out-GridView` cmdlet) to select which databases should be backed up. Once the user clicks on the "OK" button, only the highlighted databases will be backed up.
128128

129-
```
129+
```powershell
130130
Get-SqlDatabase -ServerInstance ServerB |
131131
Out-GridView -PassThru |
132132
Backup-SqlDatabase -CompressionOption On
133133
```
134134

135135
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.
136136

137-
```
137+
```powershell
138138
dir 'SQLSERVER:\SQLRegistration\Database Engine Server Group' -Recurse |
139139
WHERE {$_.Mode -ne 'd' } |
140140
FOREACH {
141-
Get-SqlAgentJobHistory -ServerInstance $_.Name -Since Midnight -OutcomesType Failed
142-
}
141+
Get-SqlAgentJobHistory -ServerInstance $_.Name -Since Midnight -OutcomesType Failed
142+
}
143143
```
144144

145145
## Contributing to the Code

0 commit comments

Comments
 (0)