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