Friday, January 29, 2021

Change Log analytics workspace from commercial to AzureGov in SCOM

 The Advisor packs have commercial url's encoded by default. To point them to Azure Gov or any other Azure installation you will have to use overrides in SCOM.

The advisor rules are targetting the healthservice for the most part. The easiest way is to override all rules to point to your desired Azure. The achieve this open authoring and change the scope to select healthservice.

 

 

 I prefer targetting the "Microsoft System Center Advisor Monitoring Server Group" because this gives more control on the agents that you want connected to your Azure via the Log analytics management pack.


.


 


 

 

Wednesday, January 6, 2021

Connect Azure Using Service principal

 

$tenantID = "ADTenantID"

$applicationid = "applicationidofthespn"
$key = ConvertTo-SecureString -AsPlainText "generatedkey" -Force
$pscredential = New-Object -TypeName System.Management.Automation.PSCredential($applicationid, $key)
Connect-AzAccount -ServicePrincipal -Credential $pscredential -Tenant $tenantID

 

 

Use the following  signing to USGovernment.

$applicationid = "applicationidofthespn"
$key = ConvertTo-SecureString -AsPlainText "generatedkey" -Force
$pscredential = New-Object -TypeName System.Management.Automation.PSCredential($applicationid, $key)
Connect-AzAccount -ServicePrincipal -Credential $pscredential -Tenant $tenantId -EnvironmentName AzureUSGovernment

 

Monday, January 4, 2021

Get SCOMGroup members using powershell.

 SCOM group members using powershell


Get-SCOMGroup | ?{$_.displayname -match "advisor"} | Get-SCOMmonitoringobject