SkillAgentSearch skills...

ALTools

Tools required to send logs to Azure Logs

Install / Use

/learn @mczerniawski/ALTools
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Build Status

|Build Status|Branch| |---|---| |Build status|master| |Build status|dev|


Index

<!-- TOC --> <!-- /TOC -->

What is ALTools

ALTools is a simple micro-module to interact with Azure Logs.

It is based on official Microsoft documentation.

In it's current state it is used to send custom PSObjects to Azure Logs.

Installation

ALTools module is available on PowerShell Gallery so installation is quite easy:

Install-Module ALTools

Examples

To send PowerShell Objects to Azure Logs you will first need to get WorkspaceID and PrimaryKey. Use this to get it.

Here are some examples of how to use this to send custom logs to Azure Logs

Current running processes

Send all files from given path Azure Logs:

Import-Module ALTools -Force

$invocationStartTime = [DateTime]::UtcNow
$object = Get-Process
$invocationEndTime = [DateTime]::UtcNow

$writeToLogAnalyticsSplat = @{
    ALWorkspaceID       = 'e2920363-xxxx-xxxx-xxxx-740exxxx801'
    invocationStartTime = $invocationStartTime
    PSObject            = $object
    ALTableIdentifier   = 'ALTools' #Your name for Azure Logs
    invocationEndTime   = $invocationEndTime
    WorkspacePrimaryKey = 'I5ZBxxxxxxxxxxxRkiy8uZ77rfTKKvzeI+g=='
}
Write-ToLogAnalytics @writeToLogAnalyticsSplat -Verbose

Files from disk

Send all current running processes to Azure Logs:

$invocationStartTime = [DateTime]::UtcNow
$object = Get-ChildItem -Path 'C:\AdminTools'
$invocationEndTime = [DateTime]::UtcNow
$writeToLogAnalyticsSplat = @{
    ALWorkspaceID       = 'e2920363-xxxx-xxxx-xxxx-740exxxx801'
    invocationStartTime = $invocationStartTime
    PSObject            = $object
    ALTableIdentifier   = 'ALTools' #Your name for Azure Logs
    invocationEndTime   = $invocationEndTime
    WorkspacePrimaryKey = 'I5ZBxxxxxxxxxxxRkiy8uZ77rfTKKvzeI+g=='
}
Write-ToLogAnalytics @writeToLogAnalyticsSplat -Verbose
View on GitHub
GitHub Stars4
CategoryDevelopment
Updated8mo ago
Forks0

Languages

PowerShell

Security Score

77/100

Audited on Jul 17, 2025

No findings