Skip to content

Instantly share code, notes, and snippets.

View markarnott's full-sized avatar
😎
Thinking

Mark Arnott markarnott

😎
Thinking
View GitHub Profile
@markarnott
markarnott / AppRegCredentialStatus.ps1
Last active December 6, 2024 18:38
A script to retrieve Entra App Registration Password Credential Status in one quick view.
<#
.SYNOPSIS
A script to retrieve Entra App Registration Password Credential Status in a list of app registrations
.DESCRIPTION
Step 1. Execute the script without the ConfigFilePath parameter. This will produce a list of app registrations in the tenant
Step 2. Save the output to a file and then edit the file to include only the app registrations you want a report on.
Step 3. Execute the script using the file you just edited.
.PARAMETER TenantId
@markarnott
markarnott / Get-AccessToken-Bash.sh
Last active September 21, 2022 00:22
Get an Access Token for Azure
#!/bin/bash
# ==== Using the Az CLI ====
az login
accessToken=$(az account get-access-token --query accessToken | tr -d \")
@markarnott
markarnott / Add-AspNetCoreEnvVarElems.ps1
Created September 6, 2017 15:02
A powershell script to inject environmentVariable elements into aspNetCore Element in web.config for ASP.NET Core Module
#
# == Turn This ==
# <?xml version="1.0" encoding="utf-8"?>
# <configuration>
# <system.webServer>
# <handlers>
# <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
# </handlers>
# <aspNetCore processPath=".\MyCoreGizmo.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
# </system.webServer>