diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..784f394 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.log +*Exports/ +*Logs/ diff --git a/Azure/User-Management/Update-EntraUsersDynamic.ps1 b/Azure/User-Management/Update-EntraUsersDynamic.ps1 index 08422c1..54ea4a9 100644 --- a/Azure/User-Management/Update-EntraUsersDynamic.ps1 +++ b/Azure/User-Management/Update-EntraUsersDynamic.ps1 @@ -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 = @{}