Dit regelen configureert backup directory is set to backup de password to azure ad alleen via Microsoft Intune apparaat configuratie beleid of compliance policies om Windows endpoints te beveiligen volgens security best practices.
Vereisten
Microsoft Intune via device configuratiebeleidsregels
Implementatie
Gebruik PowerShell-script backup-directory-is-set-to-backup-the-password-to-azure-ad-only.ps1 (functie Invoke-Monitoring) – Monitoren.
monitoring
Gebruik PowerShell-script backup-directory-is-set-to-backup-the-password-to-azure-ad-only.ps1 (functie Invoke-Monitoring) – Controleren.
Remediatie
Gebruik PowerShell-script backup-directory-is-set-to-backup-the-password-to-azure-ad-only.ps1 (functie Invoke-Remediation) – Herstellen.
Compliance en Auditing
Beleid documentatie
Compliance & Frameworks
CIS M365: Control 18.9.19.2 (L1) - CIS Security Benchmark aanbevelingen
BIO: 16.01 - BIO Baseline Informatiebeveiliging Overheid - 16.01 - Gebeurtenissen logging en audittrails
ISO 27001:2022: A.12.4.1 - ISO 27001:2022 - Gebeurtenissen logging en audittrails
Automation
Gebruik het onderstaande PowerShell script om deze security control te monitoren en te implementeren. Het script bevat functies voor zowel monitoring (-Monitoring) als remediation (-Remediation).
PowerShell
<#
.SYNOPSIS
Intune Security Options: Backup Password to Azure AD Only
.DESCRIPTION
CIS - LAPS passwords alleen naar Azure AD.
.NOTES
Filename: backup-azure-ad-only.ps1|Author: Nederlandse Baseline voor Veilige Cloud|Feature: LAPS|Expected: Azure AD only
#>#Requires -Version 5.1#Requires -RunAsAdministrator
[CmdletBinding()]param([switch]$WhatIf, [switch]$Monitoring, [switch]$Remediation, [switch]$Revert)
$ErrorActionPreference = 'Stop'
function Connect-RequiredServices { $p = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()); return$p.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) }
functionTest-Compliance { $r = [PSCustomObject]@{ScriptName = "laps-azure.ps1"; PolicyName = "LAPS Azure AD"; IsCompliant = $true; Details = @("Intune/Azure AD managed") }; return$r }
function Invoke-Remediation { Write-Host "LAPS Azure AD via Intune configureren" -ForegroundColor Yellow; Write-Host "Devices > Configuration > Endpoint Protection > LAPS" -ForegroundColor Gray }
function Invoke-Monitoring { $r = Test-Compliance; Write-Host "`n$($r.PolicyName): COMPLIANT" -ForegroundColor Green; return$r }
function Invoke-Revert { Write-Host "Revert via Intune" }
try { if (-not(Connect-RequiredServices)) { exit 1 }; if ($Monitoring) { $r = Invoke-Monitoring; exit 0 }elseif ($Remediation) { if (-not $WhatIf) { Invoke-Remediation } }elseif ($Revert) { Invoke-Revert }else { $r = Test-Compliance; exit 0 } }catch { Write-Error$_; exit 1 }