PowerShell Function - Microsoft Cloud Tokens

At times it's necessary to be able to get tokens for different Microsoft cloud platforms without having access to Developer kits or .dll modules.  This function shows how different tokens can be gained using passwords, interactive OICD login, passwords etc.

It's one of my best examples of how agile code development needs refactoring after years of ongoing updates.  It will produce a hashtable that I can use in REST calls to the various Microsoft portals like Azure or Office 365.

Tags

PowerShell Function - Retrieving Microsoft Sentinel Incident data

This example brings together various examples I've used on this site to show how Incidents from Microsoft Sentinel can be queried using PowerShell.  References to pages that demonstrate the utilised code are at the bottom of this article.

A core example of the code is below

Tags

PowerShell Function - Create Signature for writing Log Analytics data

When writing data to Log Analytics, data needs to be signed.

In a previous post (PowerShell Function - Write Data to Log Analytics | Laurie Rhodes' Info ) I showed how submit data to a workspace using Powershell and APIs.  This function is used to get the signature for the data being posted.

Tags

PowerShell Function - Write Data to Log Analytics

This example uses PowerShell to write a JSON data file into Log Analytics (and Microsoft Sentinel).

Note this uses a second function "Get-Signature" for signing the data being written to the workspace.  That function can be viewed here:

PowerShell Function - Create Signature for writing Log Analytics data | Laurie Rhodes' Info

 

Tags

Azure’s YAML provisioning templates

Azure’s ARM templates have been a rite of passage for all Azure engineers.  No one who has been working with the cloud at any depth will be without late-night stories of frustration.  The Azure Resource Manager is a service that accepts specially constructed JSON templates and uses those templates to provision each object represented within.