Setting baseline for
/subscriptions/f26d1f13-67d5-4ad6-9012-67ca12d2436f/resourcegroups/ahmadtesting/providers/microsoft.operationalinsights/workspaces/ahabas-workspace/onPremiseMachines/ahabas-dev01.middleeast.corp.microsoft.com_49640166-652f-4ee6-b48b-cfb840b8afe2_4c4c4544-0030-4b10-8039-b8c04f4a3332/sqlServers/AHABASDEV01SRV/databas
es/master.
Are you sure you want to set baseline? - This will discard your old baseline work.
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
Results WorkSpaceId
------- -----------
{VA2108 => [[dbo, db_owner1, SQL_USER]]} ba7c9d0e-a6e3-4997-b575-cf7a18a98a49
Example of using resource id parameters.
Supported resources are:
Setting baseline for
/subscriptions/f26d1f13-67d5-4ad6-9012-67ca12d2436f/resourcegroups/ahmadtesting/providers/microsoft.operationalinsights/workspaces/ahabas-workspace/onPremiseMachines/ahabas-dev01.middleeast.corp.microsoft.com_49640166-652f-4ee6-b48b-cfb840b8afe2_4c4c4544-0030-4b10-8039-b8c04f4a3332/sqlServers/AHABASDEV01SRV/databas
es/master.
Are you sure you want to set baseline? - This will discard your old baseline work.
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
Results WorkSpaceId
------- -----------
{VA2108 => [[dbo, db_owner1, SQL_USER]]} ba7c9d0e-a6e3-4997-b575-cf7a18a98a49
Example of using OnPremMachinesWithBaselineObject parameters.
Example 3: Set results as baseline for all checks on database.
Setting baseline for
/subscriptions/f26d1f13-67d5-4ad6-9012-67ca12d2436f/resourcegroups/ahmadtesting/providers/microsoft.operationalinsights/workspaces/ahabas-workspace/onPremiseMachines/ahabas-dev01.middleeast.corp.microsoft.com_49640166-652f-4ee6-b48b-cfb840b8afe2_4c4c4544-0030-4b10-8039-b8c04f4a3332/sqlServers/AHABASDEV01SRV/databas
es/master.
Are you sure you want to set baseline? - This will discard your old baseline work.
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
Results WorkSpaceId
------- -----------
{VA1017 => [], VA1018 => [[True]], VA1020 => [], VA1022 => [[False]]…} ba7c9d0e-a6e3-4997-b575-cf7a18a98a49
In this example the BaselineSet is not specified thus setting all latest results as baseline.
Example 4: Copy baseline from a database to an on prem database using pipe.
Setting baseline for
/subscriptions/f26d1f13-67d5-4ad6-9012-67ca12d2436f/resourcegroups/talmachinegroupeuap/providers/microsoft.operationalinsights/workspaces/talworkspaceeuap2/onPremiseMachines/TAHERSCO-DEV.middleeast.corp.microsoft.com_7adcdd86-adb6-4008-a254-80e0fc425c55_4c4c4544-0058-3310-8032-c4c04f4a4e32/sqlServers/SQLEXPRESS/dat
abases/master.
Are you sure you want to set baseline? - This will discard your old baseline work.
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
Results WorkSpaceId
------- -----------
{VA2108 => [[dbo, db_owner1, SQL_USER]]} 806d6dfa-132f-488d-975b-9bcf2fcd6802
Note
In this example, we move all baseline objects from one database to another using InputObjectWithResourceId parameter set. It's important that all the rules in source database exist in the destination database otherwise the operation will fail.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.