mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
Update SQLAssessmentAPITutorialNotebook.ipynb
Removed unnecessary foreach loop after confirming with Aleksei.
This commit is contained in:
@@ -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