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

Tuesday, December 8, 2020

Microsoft Azure US Government Endpoints

This is a list of Azure Government endpoints for management as on 12/8/2020

I will update this as an when I get time.

Management Service URI

https://management.core.windows.net

Storage Service DNS suffix

core.usgovcloudapi.net

Authority URI

https://login.windows.net

ARM Management URI

https://management.usgovcloudapi.net/

Graph URI

https://graph.windows.net

Audience URI

https://management.core.usgovcloudapi.net/