Minor changes

This commit is contained in:
d.dekooker committed 2026-02-26 18:38:28 +01:00
1 parent 9892d0c1be
commit e89b692f6b
2 files changed
+5 -2

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
*.log
*Exports/
*Logs/
@@ -25,7 +25,7 @@ function Update-EntraUsersDynamic {
# 1. Setup Logging # 1. Setup Logging
$LogPath = Join-Path -Path $PSScriptRoot -ChildPath "Logs" $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" $Timestamp = Get-Date -Format "yyyyMMdd-HHmm"
$LogFile = Join-Path -Path $LogPath -ChildPath "DynamicUpdate_$Timestamp.log" $LogFile = Join-Path -Path $LogPath -ChildPath "DynamicUpdate_$Timestamp.log"
@@ -47,7 +47,7 @@ function Update-EntraUsersDynamic {
try { try {
# 3. Fetch current user with all properties defined in CSV headers # 3. Fetch current user with all properties defined in CSV headers
Write-Verbose "Processing $UPN..." Write-Verbose "Processing $UPN..."
$CurrentTarget = Get-MgUser -UserId $UPN -Property $Columns -ErrorAction Stop $CurrentTarget = Get-MgUser -UserId $UPN -ErrorAction Stop
$UpdateHash = @{} $UpdateHash = @{}