Certain-Community438

u/Certain-Community438


r/PowerShell•

Over on r/Intune someone asked me to share a script. But it didn't work.

I figured I'd share it over here and link it for them, but it might generally benefit others.

# Overview

We use 2 Runbooks to clean up stale Entra ID devices. Right now, the focus is on mobile devices.

One identifies devices that meet our criteria, disables them, and logs that action on a device extension attribute and in a CSV saved to an Azure Blob container.

That script is found below.

Another Runbook later finds devices with the matching extension attribute value and deletes hem after 14 days.

This lets us disable; allow grace period; delete.

To use it in Azure Automation you need:

  • an Azure Automation Ac
76


r/BossKatana•

I record my Katana using the Record Out jack on the rear (rather than e.g. mic to speaker).

Is there any way for the amp to send both a wet & dry signal to my audio interface? Honestly I can't even determine how that might work without two discrete outputs, and yet it's a fairly common need for recording.

22


r/PowerShell•

Has anyone here written a custom function to gather more info on the above error?

The default info presented is so sparse: it seems plausible that we could at least detect

  • which assembly name had a clash, including its version
  • the version of the currently-loaded assembly
  • ideally, which module loaded the pre-existing assembly

TIA

16

r/Kusto•

Hi again,

Back so soon...

Earlier this week some of you folks helped me extract a single nested property from the MS-created "AADProvisioningLogs" table; this gets generated in Log Analytics if you choose to send it via the Diagnostic Settings in Azure AD.

As often happens, I find I now need to extract another value from the column containing this nested JSON, and I'm unable to extend the solution from the other day. Instead I found 2 other ways to do the same thing, so I'm learning...

This is what the JSON in that column looks like when exported using Kusto Explorer's Data to JSON (so TableName, Columns and Rows are not part of the array):

{
  "TableName": "AADProvisioningLogs"
112

r/Kusto•

Hi all,

My company uses SCIM Provisioning from a cloud HR application to Azure AD.
We have Log Analytics configured to receive Azure AD Provisioning logs.

The table is referenced here in the Microsoft docs:
Azure Monitor Logs reference - AADProvisioningLogs | Microsoft Learn

Looking for suggestions on a reliable approach for this task.

Objective:

  • query will identify types of provisioning error - column "ResultSignature" achieves this
  • for each error, it will list the affected user's details
    • Source object is covered by SourceIdentity.Id
    • Finding the Target identity is t
210

r/PowerShell•

Hi all,

I asked a team member to produce a script which would get all the staff for a given manager.
(There's a similar post up at the moment for AD DS, but our need was for Azure AD.)

He produced the following script - which is entirely functional:

param (
    [Parameter (Mandatory = $true)]
    [string] $targetManager
)

$global:Output = @()
function Get-DirectReports ($targetManager)   
{  
        $reports = Get-AzureADUserDirectReport -ObjectId $targetManager | where{$_.ExtensionProperty["employeeId"] -ne $null} | select Userprincipalname, DisplayName, Mail, @{N="EmployeeId";E={$_.ExtensionProperty["employeeId"]} }
        ForEach ($u
319

r/PowerShell•

I have a few Runbooks, using Managed Identities.Development of these can be a pain, since

  • most activities require authentication and authorisation
  • a Managed Identity is not going to be available locally: it lives in the cloud
  • the AuthN and AuthZ parts need to be tested just like everything else

This has led me to clunky solutions like having separate scripts with the same process logic but interactive AuthN and AuthZ, and inevitable copy-pasta between those scripts.

I'm interested in knowing what alternative approaches people take here?

One option I've considered is a switch parameter, to trigger different kinds of AuthN and AuthZ depending on whether launch is interactive or a

32

You've reached the end of this feed.