This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-MsalTokenByCertificate { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory = $false)] | |
[switch]$ForceRefresh, | |
[Parameter(Mandatory = $false)] | |
[string]$tenantId, | |
[Parameter(Mandatory = $false)] | |
[string]$clientId, | |
[Parameter(Mandatory = $false)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( $(Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Policies\Google\Chrome\" -Name "BrowserSignin") -ne 2) ) { | |
# Not found, exit with 1 to trigger remidiation. | |
exit 1 | |
} | |
else { | |
# Value found, exit 0 | |
Write-Output "Some Output Must Be Written to STDOUT" | |
exit 0 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
#https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/mac-install-manually?view=o365-worldwide | |
clear | |
# Check if real-time protection is enabled | |
if mdatp health --field real_time_protection_enabled > /dev/null; then | |
echo "Real-time protection is Enabled" | |
printf "Press Enter to continue..." | |
read -r |