Minor changes
This commit is contained in:
@@ -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 = @{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user