2
0

Minor changes

This commit is contained in:
2026-02-26 18:38:28 +01:00
parent 9892d0c1be
commit e89b692f6b
2 changed files with 5 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ function Update-EntraUsersDynamic {
# 1. Setup Logging
$LogPath = Join-Path -Path $PSScriptRoot -ChildPath "Logs"
if (-not (Test-Path $LogPath)) { New-Item -ItemType Directory -Force | Out-Null }
if (-not (Test-Path $LogPath)) { New-Item -Path $LogPath -ItemType Directory -Force | Out-Null }
$Timestamp = Get-Date -Format "yyyyMMdd-HHmm"
$LogFile = Join-Path -Path $LogPath -ChildPath "DynamicUpdate_$Timestamp.log"
@@ -47,7 +47,7 @@ function Update-EntraUsersDynamic {
try {
# 3. Fetch current user with all properties defined in CSV headers
Write-Verbose "Processing $UPN..."
$CurrentTarget = Get-MgUser -UserId $UPN -Property $Columns -ErrorAction Stop
$CurrentTarget = Get-MgUser -UserId $UPN -ErrorAction Stop
$UpdateHash = @{}