mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
Merge pull request #808 from SQLvariant/update-LinkToNotebook
Remove foreach loop
This commit is contained in:
+2
-2
@@ -103,9 +103,9 @@
|
||||
"source": [
|
||||
"### Learn more about SQL Assessment API\r\n",
|
||||
"To learn more about SQL Assesment API such as customizing and extending the rule set, saving the results in a table, etc., please visit:\r\n",
|
||||
"- Continue learning more about SQL Assessments with the ➡ [SQL Assessment API Tutorial notebook](https://github.com/microsoft/sql-server-samples/blob/master/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPITutorialNotebook.ipynb)\r\n",
|
||||
"- Docs online page: https://docs.microsoft.com/sql/sql-assessment-api/sql-assessment-api-overview \r\n",
|
||||
"- GitHub repo: http://aka.ms/sql-assessment-api\r\n",
|
||||
"- SQL Assessment API [Tutorial notebook](https://github.com/microsoft/sql-server-samples/blob/master/samples/manage/sql-assessment-api/notebooks/SQLAssessmentAPITutorialNotebook.ipynb)"
|
||||
"- GitHub repo: http://aka.ms/sql-assessment-api"
|
||||
],
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "180b3a6d-1dab-4641-acd4-dc319e81ef1f"
|
||||
|
||||
@@ -352,12 +352,8 @@
|
||||
"# This approach leverages the Registered Servers feature of SSMS to obtain a list of SQL Servers, and run checks against them.\r\n",
|
||||
"Get-ChildItem 'SQLSERVER:\\SQLRegistration\\Database Engine Server Group' | \r\n",
|
||||
"Where-Object { $_.mode -ne 'd'} | \r\n",
|
||||
"foreach \r\n",
|
||||
" {\r\n",
|
||||
" Get-SqlInstance -ServerInstance $_.Name |\r\n",
|
||||
" Invoke-SqlAssessment -FlattenOutput |\r\n",
|
||||
" Write-SqlTableData -ServerInstance localhost -DatabaseName SQLAssessmentDemo -SchemaName Assessment -TableName Results -Force\r\n",
|
||||
" }"
|
||||
"Invoke-SqlAssessment -FlattenOutput |\r\n",
|
||||
"Write-SqlTableData -ServerInstance localhost -DatabaseName SQLAssessmentDemo -SchemaName Assessment -TableName Results -Force"
|
||||
],
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "3a0c510d-07c7-464b-8b0a-2152df24e237"
|
||||
@@ -372,8 +368,7 @@
|
||||
"Get-ChildItem 'SQLSERVER:\\SQLRegistration\\Central Management Server Group' -Recurse | \r\n",
|
||||
"Where-Object { $_.mode -ne 'd'} | \r\n",
|
||||
"Invoke-SqlAssessment -FlattenOutput |\r\n",
|
||||
"Write-SqlTableData -ServerInstance localhost -DatabaseName SQLAssessmentDemo -SchemaName Assessment -TableName Results -Force\r\n",
|
||||
""
|
||||
"Write-SqlTableData -ServerInstance localhost -DatabaseName SQLAssessmentDemo -SchemaName Assessment -TableName Results -Force"
|
||||
],
|
||||
"metadata": {
|
||||
"azdata_cell_guid": "c6ca3196-b661-46b4-9818-502c779742ab"
|
||||
|
||||
Reference in New Issue
Block a user