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 |
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
# 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
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
<# | |
.SYNOPSIS | |
Retrieves Windows Update settings from the "current" and "default" registry paths for device update policies. | |
.DESCRIPTION | |
This function compares current Windows Update settings (from the current device registry path) with their default values (from the default device registry path). It displays the differences and optionally filters only configured settings in the policy. Empty or blank default values are replaced with a hyphen ("-") for better visibility. The settings are sorted alphabetically. | |
.PARAMETER IncludeProviderKeys | |
Includes keys with "_ProviderSet" and "_WinningProvider" suffixes in the output. These keys are usually omitted unless this parameter is provided. |